rsnapshot HOWTOs Docs

rsnapshot is a filesystem backup utility based on rsync. Using rsnapshot, it is possible to take snapshots of your filesystems at different points in time. Using hard links, rsnapshot creates the illusion of multiple full backups, while only taking up the space of one full backup plus differences. When coupled with ssh, it is possible to take snapshots of remote filesystems as well. rsnapshot is written in Perl, and depends on rsync. OpenSSH, GNU cp, GNU du, and the BSD logger program are also recommended, but not required. All of these should be present on most Linux systems. rsnapshot is written with the lowest common denominator in mind.

IMG2TXT Android OCR App - Privacy Policy

We do not collect any identifiable data/information about you. Our third party collect some advertising data via Google AdSense (you can read their privacy policy here). No SCAM Everything on this app is simple and clear without any compromises to privacy or security or marketing. No SPAM We do not spam your digital life with any requests or notifications or any other thing. No Personal Data Collection We do not collect any personal data from you on this IMG2TXT : Android OCR App. Camera Photos Photos are stored and processed locally on your smartphone. No images or photos are sent anywhere.

IMG2TXT Hindi OCR App Privacy Policy

We do not collect any identifiable data/information about you. Our third party collect some advertising data via Google AdSense (you can read their privacy policy here). No SCAM Everything on this app is simple and clear without any compromises to privacy or security or marketing. No SPAM We do not spam your digital life with any requests or notifications or any other thing. No Personal Data Collection We do not collect any personal data from you on this IMG2TXT : Image To Hindi Text OCR App. Camera Photos Photos are stored and processed locally on your smartphone. No images or photos are sent anywhere.

IMG2TXT Persian OCR App Privacy Policy

We do not collect any identifiable data/information about you. Our third party collect some advertising data via Google AdSense (you can read their privacy policy here). No SCAM Everything on this app is simple and clear without any compromises to privacy or security or marketing. No SPAM We do not spam your digital life with any requests or notifications or any other thing. No Personal Data Collection We do not collect any personal data from you on this IMG2TXT : Image To Persian Text OCR App. Camera Photos Photos are stored and processed locally on your smartphone. No images or photos are sent anywhere.

Where is my recorded video on mac os after sudden shutdown ?

The problem: I recorded a screencast of my desktop using the built-in screenshot / screencast tool on mac os x. But my laptop / desktop computer shutdown for whatever reason. Where is my screencast stored in mac os files ? If your mac version is Catalina or Big Sur, you’ll find your screencast in ~/Library/ScreenRecordings directory.

How to Disable Spotlight Indexing for External Storage Volumes

Indexing files and folders (directories) of storage devices is good and bad at the same time. Spotlight always indexes your macintosh storage, so you can type any program to execute it or a file name to search for it. But indexing external storage volumes is consuming too much horsepower and time of your mac computer. To make your pendrive and external harddisk plug-and-play, we are going to disable spotlight indexing for external storage volumes on your mac machine. Disable Spotlight indexing for external storage drives / volumes First let’s open Terminal application, then type this command and click ENTER (Return) key on your keyboard.

IMG2TXT Android App Privacy Policy

We do not collect any identifiable data/information about you. Our third party collect some advertising data via Google AdSense (you can read their privacy policy here). No SCAM Everything on this app is simple and clear without any compromises to privacy or security or marketing. No SPAM We do not spam your digital life with any requests or notifications or any other thing. No Personal Data Collection We do not collect any personal data from you on this IMG2TXT : Image To Arabic Text OCR App. Camera Photos Photos are stored and processed locally on your smartphone. No images or photos are sent anywhere.

Three Mistakes You Must Avoid On The Internet

If you are a youtuber and/or blogger or have any business on the internet, make you you do not make those mistakes. Spam The repeated comment on Facebook on too many posts is spam. By this repeated post or comment, you spam the news feed on other users. And that’s a prohibited thing on all websites especially platforms (Facebook, YouTube, Twitter, .. etc). Scam When you post a link of a poll and say that this website give you an iPhone as a prize, you are scammer! and that’s just a scam post. Try not to say lies with links or videos.

Design A Blogger Theme - Tutorial

Creating a blogger theme is not difficult as you might think. I searched on Google, read some documentations and tutorials, and I created a Blogger theme. So you can create your own Blogger theme too. You need to know how Blogger theme works? and How blog theme shows up? Is this tutorial for you? You must know fundamentals of HTML, CSS, Javascript and XML to understand this tutorial easily. So you can create your own customized blogger theme after this well-documented tutorial. How Blogger works? The internet browser sends an HTTP request, then Blogger parse the XHTML code of the theme and contact database if needed, then send back the rendered HTML webpage to the user’s internet browser.

How to reduce the size of image without losing quality ?

two types of compression You can reduce the size of images by compression. But there are two types of compression. lossless compression lossy compression best website to compress images There are too many programs, apps and websites to compress images. But I see that https://compressor.io/ website is the best one. In this website you have both types of compression. The lossless compression dosn’t lose quality, yet lossy compression make image lose a tiny amount of details. why compress images If you have too many images which consume a huge amount of size / space, just compress them lossless-ly and store them in less space.

Native Lazy Loading Images and Iframes

what is lazy-loading Lazy-loading means load this element on demand. We use the lazyloading technique to speed up the web page load time. using lazyloading with images Sample code for image element with lazy loading enabled. <img width="" height="" loading="lazy" src="" alt="" /> The loading="lazy" is to load the image on demand. width="200" and height="400" to save the space for the loading image. src="" for the image url. alt="" to give a description for the image for accessibility purposes. We us this CSS code snippet to make images responsive. img {max-width:100%;height:auto;} using lazyloading with iframe Just add loading="lazy" to the opening element of iframe like this.

C++ Programming Language Cheat Sheet

CPP Documentation is in progress..

How to Create File Chooser in Gtk using gotk3 ?

If you just want the complete code snippet, here is it. package main import ( "github.com/gotk3/gotk3/gdk" "github.com/gotk3/gotk3/gtk" ) func main() { gtk.Init(nil) win, _ := gtk.WindowNew(gtk.WINDOW_TOPLEVEL) win.SetTitle("sample app") win.Connect("destroy", func() { gtk.MainQuit() }) grid, _ := gtk.GridNew() win.Add(grid) imgview, _ := gtk.ImageNew() pbuf, _ := gdk.PixbufNewFromFileAtScale("./img/default.png", 400, 400, true) imgview.SetFromPixbuf(pbuf) grid.Attach(imgview, 0, 0, 1, 1) textentry, _ := gtk.EntryNew() grid.AttachNextTo(textentry, imgview, gtk.POS_BOTTOM, 1, 1) btnChoose, _ := gtk.ButtonNewWithLabel("Choose An Image") grid.AttachNextTo(btnChoose, textentry, gtk.POS_BOTTOM, 1, 1) btnChoose.Connect("clicked", func() { dlg, _ := gtk.FileChooserDialogNewWith2Buttons( "choose an image", nil, gtk.FILE_CHOOSER_ACTION_OPEN, "Open", gtk.RESPONSE_OK, "Cancel", gtk.RESPONSE_CANCEL, ) dlg.SetDefaultResponse(gtk.RESPONSE_OK) filter, _ := gtk.FileFilterNew() filter.SetName("images") filter.AddMimeType("image/png") filter.AddMimeType("image/jpeg") filter.

How to Shutdown your PC using Python ?

If you want to shutdown your Windows PC from your Python code, just use this code snippet. import os os.system("shutdown /s /t 1") That’s it. I hope this helps. Do you recommend reading this blog post? share it!

How to Shutdown PC using C++ ?

If you want to shutdown your Windows PC from your C++ code, use this code snippet. #include <stdio.h> #include <stdlib.h> int main() { system("c:\\Windows\\system32\\shutdown /s"); return 0; } I hope this helps. Do you recommend reading this blog post? share it!

How to Fix (main:30677): Gtk-WARNING **: cannot open display: ?

If you are facing this error (main:30677): Gtk-WARNING **: 05:40:47.665: cannot open display: just install Gtk+ development library, and set the display screen to 0. Installing Gtk+ using Homebrew If you are using a UNIX-like OS such as Mac OS X, or a Linux distribution. You can use Homebrew package manager to install Gtk+ as following. brew install Gtk+ Install Gtk+ using apt If you are using Debian, Ubuntu, Elementary OS, Linux Mint, .. You can use this command to install Gtk+. sudo apt-get install libgtk-3-dev Set DISPLAY Environment Variable If the error persists, just run this command on terminal to set the display to the current display/monitor/screen.

How to Tune Garbage Collector in Go Language ?

How to set the GOGC value ? You can set its value in the terminal like this. GOGC=200 Or you can change it in yaml file of the environment variable when using docker or kubernetes. What is the default value of GOGC ? The default value of GOGC is 100 which means that the garbage collection process will run when the allocations doubled from previous allocations count. What can I do to reduce the effect of garbage collection in Go ? If your Go program has a large static data set, set the GOGC to a smaller percentage; for example GOGC=50.

How to Draw Rectangle on Imageview ?

If you already have a bitmap image in your code, just use this code snippet. bmp = bmp.copy(Bitmap.Config.RGB_565, true); That code will recreate the bitmap image as a mutable. So you can edit that bitmap image on canvas as you like. But if you do not have a bitmap image in code, create a new one using this code snippet. Bitmap bmp=Bitmap.createBitmap(img.getHeight(),img.getWidth(),Bitmap.Config.RGB_565); where img is another bitmap image you want to make a new one with the height and width of it. If you want to create one from scratch here is the code snippet. Bitmap bmp=Bitmap.createBitmap(400,700,Bitmap.Config.RGB_565); After that, create a canvas and pass the bitmap image you have.

Linux Laptop Boot Battery Optimizations

Boot Optimization use sudo systemd-analyze critical-chain to get the most time consuming services. If you don’t need those services just disable them by this command sudo systemctl disable service-name.service and replace the service-name with the name of the service you want to disable. BIOS Optimization Just disable any feature you do not use such as fingerprint scanner. To reboot into your BIOS settings, use this command sudo systemctl reboot --firmware-setup. Battery Optimization Use tlp to manage your battery, and use powertop to get the power consumption statistics. Install tlp and powertop using this command sudo apt install tlp powertop. To enable tlp to manage your laptop battery, run this command in terminal sudo systemctl enable tlp.

Ubuntu boots to black screen after trying to install proprietary Nvidia graphics driver

The problem occured after installing proprietary Nvidia graphics driver using those commands. sudo apt-get update && clear && apt-cache search nvidia-[0-9] | grep 'binary driver' sudo apt-get purge nvidia* sudo apt-get install nvidia-340 nvidia-settings sudo nvidia-xconfig The fix is to let the built-in ubuntu-drivers program decide automatically which graphics driver to install. Open the terminal and type this command to update the apt repositories. sudo apt update Then, remove all packages started with nvidia using this command. sudo apt remove '^nvidia' After that, let the apt remove not needed packages automatically using this command. sudo apt autoremove Finally, let ubuntu-drivers automatically install the suitable proprietary Nvidia graphics driver for your GPU.

How to Create Bash Function ?

First step: create a utilities.sh file to add all your bash functions in it. 2nd step: add your bash function/s like this. ## utilities.sh convertMP4toMP3(){ echo -n "Enter source mp4 file : " read sourceFile echo -n "Enter destination mp3 file : " read destFile avconv -i $sourceFile -vn -acodec libmp3lame -ac 2 -ab 160k -ar 48000 $destFile } I created a bash function to convert mp4 video file to mp3 audio file from command line. 3rd step: source the utilities.sh Bash file source utilities.sh Finally, you can call the function from the command line (terminal) and use it like this.

Convert Mp4 to Mp3 in Linux Terminal

First things first, install the required software packages. sudo apt-get install ffmpeg && sudo apt-get install libavcodec-extra-53 Then use it. For FFmpeg with Constant Bitrate Encoding (CBR) ffmpeg -i video.mp4 -vn \ -acodec libmp3lame -ac 2 -ab 160k -ar 48000 \ audio.mp3 or if you want to use Variable Bitrate Encoding (VBR) ffmpeg -i video.mp4 -vn \ -acodec libmp3lame -ac 2 -qscale:a 4 -ar 48000 \ audio.mp3 If it says ffmpeg is depricated use this command instead. avconv -i video.mp4 -vn -acodec libmp3lame -ac 2 -ab 160k -ar 48000 audio.mp3 The meaning of arguments argv meaning -i input file name -vn disable video recording -acodec force audio codec to libmp3lame -ac set the number of audio channels -ar set the audio sampling frequency I hope this helps.

Adding GIF image in an ImageView in android

use android-gif-drawable library add the following dependency to build.gradle file of your project. dependencies { implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.19' } Use the view in XML file like this. <pl.droidsonroids.gif.GifImageView android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/src_anim" android:background="@drawable/bg_anim" /> For more customization and code, see the docs here. use VideoView on Android You can use VideoView to show the GIF image. But the library is more efficient and smooth. use ImageView on Android Use ImageView and Split the GIF file into several images and then apply animation to it. It is complicated and not worth it because the library is more efficient and elegant. use Glide library add the dependency to build.

How to make imageview over another view in Android ?

There are at least 3 ways to put imageview on another imageview. Simple Order This way is just put the imageview after the other imageview in XML file. It is simple like that. The first view will be underneath the second one. Using FrameLayout <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" > <ImageView android:id="@+id/imageView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/t" /> <ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_launcher" /> </FrameLayout> The second image will be on top. Put imageview on another imageview exactly <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@color/white" > <ImageView android:id="@+id/inside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="5dip" android:layout_marginTop="5dip" android:src="@drawable/frame" /> <ImageView android:id="@+id/outside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@id/inside_imageview" android:layout_alignBottom="@id/inside_imageview" android:layout_alignLeft="@id/inside_imageview" android:layout_alignRight="@id/inside_imageview" android:scaleType="fitXY" /> </RelativeLayout> As you can see, the second imageview has those properties.

Comparing Two Integers in C Programming Language

Here is the code snippet in C programming language. #include <stdio.h> int main() { int a, b; a = 11; b = 99; // to take values from user input uncomment the below lines − // printf("Enter value for A :"); // scanf("%d", &a); // printf("Enter value for B :"); // scanf("%d", &b); if(a > b) printf("a is greater than b"); else printf("a is not greater than b"); return 0; }

Elixir Cheatsheet - Elixir in Brief

Elixir is a dynamic functional compiled language that runs over an Erlang Virtual Machine called BEAM. Erlang and its BEAM is well known for running low-lattency, distributed and fault-tolerant applications. Elixir was designed to take all that advantages in a modern coding language. Elixir data types are immutable. In Elixir a function is usually described with its arity (number of arguments), such as: is_boolean/1. File Types .exs => Elixir script file .ex => Elixir regular file .beam => Compiled Elixir file Compile and Run Elixir code elixir <script_file>.exs => run a script file elixirc <file>.ex => compile a file to Elixir.

Python Cheatsheet

Python sys Variables variable meaning argv Command line args builti­n_m­odu­le_­names Linked C modules byteorder Native byte order check_­int­erval Signal check frequency exec_p­refix Root directory executable Name of executable exitfunc Exit function name modules Loaded modules path Search path platform Current platform stdin, stdout, stderr File objects for I/O versio­n_info Python version info winver Version number Python sys.argv sys.argv for the command: python foo.py bar -c qux --h sys.

PHP cheatsheet

PHP Array Functions array_diff (arr1, arr2 …) array_filter (arr, function) array_flip (arr) array_intersect (arr1, arr2 …) array_merge (arr1, arr2 …) array_pop (arr) array_push (arr, var1, var2 …) array_reverse (arr) array_search (needle, arr) array_walk (arr, function) count (count) in_array (needle, haystack) PHP String Functions crypt (str, salt) explode (sep, str) implode (glue, arr) nl2br (str) sprintf (frmt, args) strip_tags (str, allowed_tags) str_replace (search, replace, str) strpos (str, needle) strrev (str) strstr (str, needle) strtolower (str) strtoupper (str) substr (string, start, len) PHP Filesystem Functions clearstatcache () copy (source, dest) fclose (handle) fgets (handle, len) file (file) filemtime (file) filesize (file) file_exists (file) fopen (file, mode) fread (handle, len) fwrite (handle, str) readfile (file) PHP Date and Time Functions checkdate (month, day, year) date (format, timestamp) getdate (timestamp) mktime (hr, min, sec, month, day, yr) strftime (formatstring, timestamp) strtotime (str) time () PHP Regular Expres­sions Functions ereg (pattern, str) split (pattern, str) ereg_replace (pattern, replace, str) preg_grep (pattern, arr) preg_match (pattern, str) preg_match_all (pattern, str, arr) preg_replace (pattern, replace, str) preg_split (pattern, str) Regular Expres­sions Syntax regex meaning ^ Start of string $ End of string .

How to get currently running applications in android ?

Use this code in your app’s `src/MainActivity.kt’ file. import android.app.ActivityManager import android.app.ActivityManager.RunningTaskInfo import android.content.Context import android.os.Bundle import android.widget.TextView import androidx.appcompat.app.AppCompatActivity import java.util.* class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) title = "KotlinApp" val textView: TextView = findViewById(R.id.textView) val activityManager = getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager val recentTasks: List<RunningTaskInfo> = Objects.requireNonNull(activityManager).getRunningTasks(Int.MAX_VALUE) for (i in recentTasks.indices) { textView.text = "Application executed: ${recentTasks[i].baseActivity!!.toShortString()}ID: ${recentTasks[i].id}" } } } Make sure you have a TextView with id textView in your XML layout. All the currently running applications on your smartphone will be shown in the textview.

Should I use Swift or Objective-C to learn iOS development ?

The Swift programming language is the standard features rich language to create iOS apps, iPadOS apps and MacOS X apps. The present and the future is just Swift on Apple ecosystem. Apple is perfecting Swift every year with updates and new features and capabilities. We are now in the era of SwiftUI, you should go for Swift already. Swift itself is a robust programming language. So go for it! it is standard for hiring, learning, creating apps for Apple operating systems.