Open Source code doesn’t always come in big complex packages. At ProPublica we sometimes share small, simple snippets of using GitHub "Gists." These Gists range from single-byte file delimiters to an entire JavaScript framework for making stepper graphics. They rarely have documentation and don’t even always have names, but they can be super-useful. Here are some we’ve shared over the past few years:
- A simple way to grab remote template elements in your Rails app (after Brian Boyer's RemoteSnippets) https://gist.github.com/1664329
- A single byte gist that contains ASCII character 28, which the FEC uses as a field delimiter. https://gist.github.com/2191300
- A [quine](http://en.wikipedia.org/wiki/Quine_(computing) in Ruby https://gist.github.com/523940
- Check links on a page using JavaScript https://gist.github.com/1502737
- Convert state abbreviations to and from AP Style in JavaScript (requires Underscore) https://gist.github.com/1006390
- Find out if you have permission to publish to a user's Facebook stream, using JavaScript https://gist.github.com/1181004
- Grab U.S. Code by statute using Ruby https://gist.github.com/861266
- JavaScript color generator based on Tyson Evan's color pallete https://gist.github.com/1558470
- Natural language document clustering in Ruby https://gist.github.com/1508278
- Non-strict CSV parser in Ruby https://gist.github.com/1684042
- Parse Unix diffs using Ruby https://gist.github.com/335891
- Poor Man's Fech, in Ruby https://gist.github.com/1405852
- Rake task to build github pages https://gist.github.com/891157
- Ruby code to purge Amazon CloudFront cache https://gist.github.com/1630177
- Shell script to download TIGER/Line shapefiles https://gist.github.com/885812
- Simple dynamic page titles for Rails https://gist.github.com/981957
- Simple JavaScript graphing framework https://gist.github.com/1690779
- Simple Ruby benchmark https://gist.github.com/987477
- Stepper graphic framework using JavaScript https://gist.github.com/1703708
- Turn CSVs into JSON, in Ruby https://gist.github.com/1334996
- Turn hashtags in git commit messages into git tags using Ruby https://gist.github.com/826360
Naturally, this post is available as a gist, too.