Great syntax highlighting plugin for WordPress

At times, I think I spend more time writing about using wordpress than actually using it sometimes. I’ll need to fix that. Today, thanks to WordPress’s dashboard, I came across the WP-Codebox plugin. THanks to GeSHI, it can color up a lot of languages and fixes some problems I’ve had with other plugins. Honestly, I’ve never been satisfied with any of them. I think this could change that.

Just to show it off, I present to you some random ruby I wrote the other day when I was working on something. I’ll leave it to you to guess what I’m doing and why with this code. (And I also think I could do it better than using a while loop, but I was able to bang it out quickly for what I needed.)

#!/usr/bin/env ruby
require 'fileutils'

offset = 214

files = Dir['*']

count = 1
while !files.empty?
  file = files.delete_at(rand(files.size))
  extention = File.extname(file).downcase
  name = sprintf('%d%s', count + offset, extention)
  puts "#{file} -> #{name}"
  FileUtils.move(file, name)
  count += 1