I wrote this Gist a while ago and it came in handy last week when I was showing a colleague some handy shortcuts to add to his bash profile.
To use these:
Open a terminal window and type
open -e ~/.bash_profile to open the file in your Mac’s default text editor.
Add the first two shortcuts, then save and exit.
source ~/.bash_profile to reload it, then you can use the shortcuts
editBash to add in the other shortcuts and
reloadBash to reload it afterwards.