rsync tips and tricks

Transfer a file, resuming if there was any partial progress:

rsync -avzl -e ssh --partial --progress <remote_path> <local_path>

Alt-tick in Linux

In Ubuntu/Mint, alt-back_tick is an annoying shortcut with no easy way to disable it. It conflicts with PyCharm’s shortcuts unless disabled.

After some trolling through launchpad bug reports and stackoverflow questions, here is how to disable it:

  • install dconf-editor
  • look for keys bound to Above_Tab:

     $ gsettings list-recursively | grep Above_Tab
    

    In my case, this was the following keys:

     org.cinnamon.desktop.keybindings.wm switch-group
     org.gnome.desktop.wm.keybindings switch-group
    
  • Change those settings (in dconf-editor) to [‘disabled’]

ccache will speed up your compilation game

Installing ccache creates several symlinks to compilers in /usr/lib/. To make ccache used by default (system-wide), just prepend /usr/lib/ccache to the PATH. This will make sure ccache gets called instead of cc/gcc/g++/etc, so it can do its magic and only call your compiler if it needs to.

So basically inside your .bashrc:

# Enable ccache by prepending its directory to the path
# ccache will get called instead of the vanilla compiler.
export PATH=/usr/lib/ccache:$PATH