Rocking Twenty Fifteen

This week my friend Lance Willett wrote a blog post encouraging people to start a blog. I wasn’t really inspired to start a blog since I already have one (heh), but after visiting his blog, I was inspired to change to the Twenty Fifteen theme that will be shipping with the impending WordPress 4.1 release.

The takeway? Sometimes seeing a site rocking a WordPress theme with a bold color scheme is enough for me to inspire a change.

For the last while I’ve been running the Wilson theme by Anders Noren on WerdsWords, and realized that Twenty Fifteen really accomplished many of the same aesthetic goals I had hoped to meet with Wilson.

Probably my favorite feature of Twenty Fifteen is the color schemes and ease with which you can set a color scheme then customize it to your own preferences. I think I’ll be sticking with this one for quite a while.

Nice work from Takashi Irie, Ian Stewart, and the rest of the WordPress.org Bundled Themes team on getting Twenty Fifteen out the door!

parse_git_branch() stopped working after Xcode 6.0.1 update [FIX]

I got a little surprise after I updated Xcode and the Command Line Tools this morning: the bash prompts in my shell had stopped displaying the current git branch. Eeek!

For those of you who aren’t familiar with parse_git_branch(), it’s a small bash script that simply highlights the current git branch at the end of the bash prompt. It lives in your ~/.bash_profile or ~/.bashrc file.

When it’s working, it looks something like this:

$ (master) (where (master) is the current git branch)

Some people use tools like zsh or liquidprompt to accomplish the same effect, but I use this little bash function because I don’t need all that extra stuff.

I poked around the web for a while this morning and couldn’t find any solutions.

Turns out, it’s a simple fix:

  1. Open Xcode
  2. Click to Agree to the new terms
  3. Install the remaining components
  4. Reload your shell of choice

Hope that helps somebody.

If you’re interested in using parse_git_branch() yourself, you can simply put the following into your ~/.bash_profile or ~/.bashrc file:

function parse_git_branch() {
	git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}

RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
NO_COLOUR="\[\033[0m\]"

PS1="$GREEN\u-MBA$NO_COLOUR:\w$YELLOW\$(parse_git_branch)$NO_COLOUR\$ "

There’s also a couple of non-sed versions floating around the web if that’s your preference. Adjust the colors as needed.