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 :
2015-11-05 Update: I don’t use this approach anymore. Github limits the usage for this service. I now use a wordpress highligher plugin instead.