Updated at 2013-03-30 18:38

This note contains some magic commands that can be useful. These work on most distributions, but sometimes you need to install the program.

# Run last command after replacing parts of the command.

# Run last command as root.
sudo !!

# Argument expansion.
mv app/models/foo.rb app/models/foobar.rb
# is same as
mv app/models/{foo,foobar}.rb

# To replace all

# Share current directory over HTTP.
python -m SimpleHTTPServer 8080

# Get your OS X talking.
say yeah!