The folks over at Github have been making quite a stir in the open source world. A lot of major projects, including Ruby on Rails have moved to it, and with good reason. Git is a very powerful source code management tool, especially for open source projects. Github has helped git grow in popularity by leaps and bounds by giving people a place to host projects simply, without having to learn the intricacies of hosting a git repository. On top of that, they’ve provided many tools to aid in collaboration and history viewing.
But github isn’t what I want to talk about today. Today, I’m going to talk about gist. Gist is a new pasting service from the good folks at Github. For those of you unfamiliar with what that means, a pasting service is a tool for posting snippets of code or plain text quickly and easily online for sharing. I use this service regularly for sending someone an example of how to do something that would be too cumbersome to type into my chat client. It’s also extremely useful for posting snippets of code up when asking for help on a message board or IRC channel.
What makes gist special over many of the other pasting services I’ve used before - aside from its clever name - is that it’s based on git. Each gist(pasting) is actually a mini git repository that you can clone(checkout) and make changes to, etc. It’s a very clever idea, and quite useful.
Another really sweet feature of gist is that the site provides javascript based embedable tags that you can drop into your own websites that will display the code snippets, properly formatted and with syntax highlighting. Getting sample source code to look good on this site has been something I’ve struggled with since I first started blogging. I’ve used all kinds of formatting plugins, used features in TextMate that produce a nice result but use an insanely unmanageable amount of markup. I’ve even just posting links to other pasting services before.
This is so much easier:
I often use google to search wikipedia with keywords like “wikipedia little endian.” I discovered on accident this morning that if you just type wikipedia, Google actually supplies a search box for wikipedia within their result set. Pretty cool. Is this new? Is it just for wikipedia? Is there an API for defining this?