Quite Useful Code Blogging Tips
I do a lot of technical blogging, and this involves writing code in my posts. It’s a real hassle too. I forget to escape it, then it comes out all wrong. Recently I discovered some nifty ways to easily post and share code. Some even use JavaScript (see the Gist example below) so you don’t even need to install anything.
Embed code samples with Gist
Gist on Github allows you to embed code samples within your posts. This works well if you use a hosted service like Tumblr. It even does syntax highlighting:

Embed with Pastie
Pastie works in pretty much the same way. The embedded result even looks very similar to Gists (Pastie came first though!):

Snare code on microblogs with Snipt
A slightly different service is Snipt. Snipt is really for sharing code on Twitter. Here’s a sample: Ico code sample.
You can’t embed code with Snipt, but you wouldn’t want to on a microblog anyway. Ultimately you could use Gist or Pastie to achieve the same thing.
Writing code in popular blogging engines
Some blogging engines explicitly support posting code. Typo takes out loads of the hassles of posting code with a custom tag: simply wrap code in: <typo:code>. It’ll even do syntax highlighting if you specify a lang attribute. Read more on Ric Robert’s blog: Typo Filters make posting code easy.
Wordpress has a lot of plugins you can use to embed code. WP-Syntax is a relatively popular one.

