How to Export a Mac's Contacts or Address Book

As part of my callerid project I use a simple CSV address book to lookup names from an inbound call. Having to maintain this manually in a spreadsheet is far too painful if I can just export from a master source from time to time and as I keep my addresses synced in my mac and phone using the Contacts app I just need a away to export them to a file. Natively the Contacts app can export as a vCard and I am sure there must be suitable parsers to read one but that would mean changing my super simple CSV address book code. What is interesting is that like a number of Apple applications it uses Sqlite as its backing store. Crack open the file, run some queries and you can retrieve contact data.

Read more of How to Export a Mac's Contacts or Address Book


How to Auto Strip Git Comments

I recently acquired a new mac at work and soon realised that I was missing my familiar git template with commit message good form hints. In addition after a subsequent merge failed the fix with its commit retained the git warning comments in the message when they used to be removed. For posterity sake the .gitconfig needs the following lines:

Read more of How to Auto Strip Git Comments