Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

dotmacsyncclient

Sync with .Mac (MobileMe) from the command line

locate *dotmacsyncclient

/usr/bin/sudo /bin/ln -is /System/Library/CoreServices/dotmacsyncclient /usr/bin/dotmacsyncclient
dotmacsyncclient
dotmacsyncclient --version
dotmacsyncclient --listclients

Deleting a line from a file matching criteria

I was messing around trying to figure out an easier way to remove entries from my /etc/portage/package.keywords file without having to drop into VI all the time and came up with this. You can put this into a bash script to make things alot easier on yourself if you are constantly altering your mask/use/keywords files in Gentoo.

sed -i '/x11-wm\/compiz/d' /etc/portage/package.keywords


The above example will remove any line that matches the regular expression x11-wm/compiz and edit the file in place "-i".