I was going to do something very similar to this, so thanks for saving me the effort! :)
I already built a couple Github jQuery widgets that people in this thread might also find relevant: http://www.joepettersson.com/demo/pretty-gist/ http://www.joepettersson.com/demo/jquery-github-widget/