About Bash (bashrc/profile files, useful aliases and functions)

The bash files

/bin/bash – The bash executable
/etc/profile – The systemwide initialization file, executed for login shells
/etc/bash.bashrc – The systemwide per-interactive-shell startup file
/etc/bash.bash.logout – The systemwide login shell cleanup file, executed when a login shell exits
~/.bash_profile – The personal initialization file, executed for login shells
~/.bashrc – The individual per-interactive-shell startup file
~/.bash_logout – The individual login shell cleanup file, executed when a login shell exits
~/.inputrc – Individual readline initialization file

Useful bash aliases and functions:

http://xmodulo.com/useful-bash-aliases-functions.html

http://teohm.com/blog/2012/01/04/shortcuts-to-move-faster-in-bash-command-line/

http://www.catonmat.net/blog/bash-vi-editing-mode-cheat-sheet/

 

Finder shortcut for creating a new empty file

Every now and then, for various reasons, I find myself wanting to add a new empty file to a folder. In the Windows world this is easily done through the context menu, i.e. right click→New→Text Document, but I didn’t have any neat way of doing it in Mac OS X Finder (without opening up Terminal to run “touch newfile”) – until I found this: http://www.codium.co.nz/touch%5Fhere%5Fapp/.

It works really well! For times when I want to have a bit more of “text beauty” I can create a file, open it in TextEdit and simply convert to Rich Text.

How to take screenshots in Android 4

Apparently there are different ways of how to take screenshots in Android, this describes some of them.

In Android 4.4 on Samsung: Press the Power and Home (hard) button simultaneously and keep them pressed for a moment.

On HTC: Press the Volume Down and Power buttons simultaneously and keep them pressed for a moment.

Re-enabled backspace to go back a page in Safari 6

When I updated Safari from version 5 to version 6 I discovered the backspace key to go back to the previous page doesn’t work any longer. I’ve always used backspace for that purpose (when not entering text into a form), so here is how it is fixed:
http://hints.macworld.com/article.php?story=20120727025535867

In short:

defaults write com.apple.Safari NSUserKeyEquivalents -dict-add Back "\U232b"