I have a few scripts in the works that I plan on posting up here. But, I thought the presentation of the code examples could be better. I wanted the examples to have code highlighting and the ability to automatically turn a full HTML code example into a working demo. And that is what I made. The code highlighting is accomplished with Chili with two small custom tweaks. For greater details, you can download my code-highlighter.js script and the CSS is at the end of entry.css. (Warning, it is tailored to my site which means if you use it you might have to change it.)
How to use Code Highlighter
Just wrap you code examples as below where [lang] is the language to highlight for.
<pre class="sample"><code language="[lang]">
...your example code...
</code></pre>
In addition to language, there are two other attributes you can optional set. The first optional attribute is demo. If set to true, then an IFRAME will be generated using the example code to demonstrate the code. This works best for full HTML examples.
<pre class="sample"><code language="html" demo="true" >
...
</code></pre>
The second optional attribute is line-number-start. Give a number to start the line numbering at instead of the default of 1. (Since I use the CSS counter for the numbering, Safari ignores this.)
<pre class="sample"><code language="html" line-number-start="12" >
...
</code></pre>
Last caveat, all your example have to be within div#content.