Enabling Code Blocks on Tumblr via Google PrettyPrint

Grab the prettify.js and a prettify css style from the Google Code repository, stick them in your ‘head’ tag

<link rel="stylesheet" type="text/css" media="screen" href="https://google-code-prettify.googlecode.com/svn/trunk/styles/sunburst.css" />

<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/prettify/188.0.0/prettify.js"></script>

Grab jQuery and append prettyPrint on every pre element it can find on your blog, then call prettyPrint()

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

$(document).ready( function(){
    $('code').parent('pre').addClass('prettyprint');
    prettyPrint();
});   

There you have it!