I recently decided to migrate away from OSX’s default ruby install yesterday and noticed a few quirky hangups. Firstly, for some reason, and I’m not sure if it is just me or not, OSX’s default $PATH variable is putting /usr/local/bin AFTER /bin making your local installs not enabled by default. (Editing the /etc/paths didn’t do [...]
More
Took the idea from Dive Into Mark because I’m bored.
If you’re curious to see which commands you use the most just run:
$>history | awk ‘{a[$2]++}END{for(i in a){print a[i] ” ” i}}’ | sort -rn | head
# local server
133 l
70 cd
47 svn
38 ..
29 e
26 mv
20 ll
10 rm
10 cp
8 ror
# remote server
123 l
74 cd
35 [...]
More
Okay — so after that last post I decided it was time for a change. I’ve had the same bash prompt for years and was starting to get tired of it. Over the past 30 or so minutes I’ve been hating life learning way more than I wanted to about PS1, colors and embedded IF [...]
More
This is a neat little “trick” to prepend something simple to the beginning of a file. Linux is funny in the way that you can easily append to a file by using echo “append me to the file” >> FILE but theres no real simple way to prepend. Most snippets I’ve seen use a tmp [...]
More
Because I’ll forget #1023
Problem
Use Linux’s “find” command to hunt recursively through the current directory tree and find all matching files. While this is simple enough, I’m an idiot and tend to delete important files when drinking working too much — which we all know sucks. It would be nice to have it take all found [...]
More