I found this snippet of code at Robert O’Rourkes blog. It easily lets you embed a gist from github to your wordpress posts. Up til now i’ve been using Syntax highlighter evolved which has not been working well all the time. And with this implementation you also get version control.
Start of by adding the following to the functions.php file of your theme:
And when you’re done all you have to do is add a link to a post :