GitHub, purveyors of high-quality source control beauty, released Gist just the other day. Gist, in a nutshell, is pasteable texts controlled by git. Every single one has its own repository. So in theory you can download them, fork them, and thanks to the GitHub guys, embed them in your own webpages. This provides a unique opportunity to ensure that the posts you write about edge community stuff — I’m looking at you, Rails and Merb jerks :-) — can remain relevant. Simply write a Gist with your source code and corresponding output, and embed that in your blog. Tag that blog entry somehow with a reminder to check it every four months or something. And, every four months, when something reminds you, you take another look at the source code snippet, and make sure it’s relevant.
What needs fixing with Gist?
- Downloading snippets at all doesn’t seem to work. It makes sense to not have that button when it comes to snippets comprised of a single file, but with being able to specify multiple files for a single snippet, downloading should archive and download them all.
- It should be possible to only embed one part of a snippet, instead of all parts of them, in the case when multiple files are specified.
What would be awesome?
- Being able to specify a certain file of the snippet as an
rspecorTest::Unitfile for the snippet. This way, we can have auto-testing snippets. This is clearly in a fantastical sort of realm, but who knows what will be possible when Gist becomes more robust?
2 Comments
Great idea. Another nice feature that could be used is the ability to link to specific lines (you can do this with repos on github)
Michael -
That certainly is an interesting idea, although I’m not sure how necessary it would be, considering the snippets are generally supposed to be only a handful of lines long anyway.
Although your comment makes me think - comments on snippets and individual lines of snippets would be awesome, especially if that functionality were accessible through their embedded versions.