Parsing compiler or grep output for emacsclient

This short bash snippet allows you to copy and paste any grep or compiler output of the form some/ to emacsclient to jump to the specified file, line and column in Emacs:

function emacsClient()
  set $1
  if [ $# -eq 3 ]
    emacsclient -n +"$2:$3" "$1"
  elif [ $# -eq 2 ]
    emacsclient -n +"$2:1" "$1"
    emacsclient -n "$1"

alias ec=emacsClient

Example call:

$ grep -nH custom init.el
init.el:93:  (setq custom-file (expand-file-name "custom.el" (or (file-name-directory user-init-file) default-directory)))
init.el:94:  (load custom-file)
init.el:95:  (global-set-key (kbd "") '(lambda () (interactive) (load custom-file)))
$ ec init.el:95:

SSL Everywhere for Safari

The EFF has published a Firefox extension to force HTTPS on as many websites as possible. This is a good idea(tm). But on OS X I use Safari, not Firefox. So I was wondering if there is a similar extension for Safari. It turns out there is. However, this extension is available in source only. The reason for this is given in a blog post by the developer. In short: The Safari extension API is limited, and the extension cannot guarantee that all your session cookies are transferred via HTTPS, making you vulnerable to stuff like Firesheep. And that is a bad thing(tm). But it is still useful, since it will redirect you to secure versions of the websites. One thing to note when following the build instructions: You need to enroll in the free Safari Dev program, and get a developer certificate. This is very well described over at Apple’s developer center. After that, you can enable the developer menu in Safari’s settings and just install the extension from the cloned git repository.

Doxygen UI for OS X

MacPorts comes with a nice package for Doxygen, the source documentation tool. However, it is missing the doxywizard, to quickly create and edit the sometimes very long Doxygen configuration files. However, there is a page (even from the original Doxygen guy) hosting special OS X builds with a nice small bundle, that you can drop into your Applications folder and which looks like this:

How to set up git email notifications

This is not very well documented in the git user manual. Here is what I did:

Go to your central repository, not your working copy. There, change to the hooks directory:

cd /path/to/yourproject/hooks
cp post-receive.sample post-receive

If your repo is not a bare repository, you have to change to .git/hooks to do this. The post-receive-email script can be found under contrib/hooks/ in the git documentation (e.g. in /usr/share/doc/git/contrib/hooks on most Linux distributions).
Now configure the email hook:

git config hooks.mailinglist “,”
git config hooks.envelopesender
git config hooks.emailprefix “New commit: “

Also you should give your project a name:

$EDITOR /path/to/yourproject/description