Dealing with $path
To edit $path on Mac OS lion create a file with a simple list of directories, line per line like this:
path/to/something path/to/something/else
and add the file to /etc/paths.d/
You could also directly edit the paths file under /etc/paths
.*rc Files
Further reading on shell-file-loading: http://hayne.net/MacDev/Notes/unixFAQ.html#shellStartup
If .bash_profile
or .bash_login
exist .profile
will not be loaded.
Python Server
python -m SimpleHTTPServer [port]
PHP Server
php -S localhost:8000
Make file executable
chmod +x somefilename.sh
Find files
find . -name 'somefile.js'
Create bare compass project
compass create --bare folder_name
Using regex with files (Taken from here)
Put the following to your .bashrc
shopt -s extglob
It extends regexes.
You can then move all files except one by
mv !(fileOne) ~/path/newFolder