Monday, November 29, 2010

Don't require password for sudo

Simple but forgettable because it's done only once...
$ sudo visudo #add desired username to the file in the following format:
[user_name] ALL=NOPASSWD: ALL

Wednesday, November 10, 2010

Enable color-coding for diff in TextMate

You can pipe output from diff command as well as pipe the output of a diff from a source control tool directly into TextMate (e.g., diff v1 v2 | mate or hg diff | mate).
However, you may be missing the nice coloring in the newly opened window that is supporte by TextMate by default. As it often is the case, getting this to work is easy but you first need to find how to get there. So, to toggle the coloring, simply press Ctrl+Option+Shift+D (if this does not work on your system, go to Bundles->Bundle Editor->Show Bundle Editor click on Diff bundle. In the Activation text field is the keyboard shortcut you can use to toggle color coding for diff). Enjoy!