Craig Russell

Web n That

I ♡… the web… php… html… css… linux… shell scripting… folding paper… dog walking… sandwiches… being outside… and most of all @vicuol ☺

Change is Coming… Syntax Highlighted Change

June 23rd, 2010

After the recent release of WordPress 3.0, I’ve decided to redesign my site taking in to account some of the fantastic new features it has to offer (more on that in a future post). But while I was hunting around for bits and bobs I found out about the marvellous syntax highlighter project, which allows me to do funky crap like this…

1
2
3
while read LINE; do
   echo $LINE
done < $0

Rather handily the highlighter script has been wrapped in to widget (several actually) for easily jamming in to WordPress.

Laters!

P.S. That script is my attempt at a Quine, a cheat I know, but it was the first code sample that jumped in to my head while I was writing.

EDIT April 2011: I’m now using a different plugin for syntax highlighting