This short bash snippet allows you to copy and paste any grep or compiler output of the form
emacsclient to jump to the specified file, line and column in Emacs:
if [ $# -eq 3 ]
emacsclient -n +"$2:$3" "$1"
elif [ $# -eq 2 ]
emacsclient -n +"$2:1" "$1"
emacsclient -n "$1"
$ 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:
Update: I forgot to make the IFS variable local to the function. This would break things like git-bash-prompt, if the IFS is suddenly set to something else.
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.
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:
Good news: The Qt port of MacPorts is working again. The port was upgraded to Qt 4.6 and now it compiles again. Now all I need is a 64 bit CUDA package for Snow Leopard, and I’ll be happy.
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:
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 “firstname.lastname@example.org, email@example.com”
git config hooks.envelopesender firstname.lastname@example.org
git config hooks.emailprefix “New commit: “
Also you should give your project a name: