Github uses Pygments: http://pygments.org/
I don't know what language you're using, but here's a Ruby library for it: https://github.com/tmm1/pygments.rb
Edit: Scrolled down and saw Django. Pygments is native to Python, so you might be in luck if you want to use that.