All blog posts from February 2008

Ruby shared-mime-info gem and OS X

February 18, 2008

For anyone doing stuff requiring a good MIME library in Ruby, shared-mime-info works well. On OS X a few things are necessary to make it work though.

First, use ports to install the shared-mime-info database:

sudo port install shared-mime-info

Then you have to set XDG_DATA_DIRS to point at the right…

Read more

ZSH Prompt to show git branch

February 15, 2008

After using git for a little bit I started tinkering with ZSH, to get the current branch in my prompt. What I ended up with is this:

Turns out it's pretty easy - somewhere in your .zshrc you need to put the following:

# get the name of the branch we are on
git_prompt_info() {
  ref=$(git-symbolic-…

Read more

Displaying all 2 posts