Something I didn’t realise was possible until now, is WordPress natively supports Github Gists. All you have to do to embed a gist in your post is copy and paste the gist url on a new line. Everything else is handled automatically!
Code formatting is something that has been difficult for me up until now, any posts from now on will definitely be using gists.
More info here: http://en.support.wordpress.com/gist/