How do you archive or share your code?

Over the years I’ve wrestled with a good system for archiving code snippets.  From posting on blogs, to filling up my hard drive with example files, there hasn’t been a system that stuck with me.  If you google up code snippet sharing you’ll find all sorts of sharing services to suite your needs, and they all pretty much do the same thing.

Being a junky for free internet services, I’m trying a new code archiving system that uses GitHub’s gist drops, and Posterous.com’s email publishing.  It’s a simple three step process that I’m really digging so far.

  1. Create code snippet at http://gist.github.com/
  2. Email the gist url to post@posterous.com
  3. Rejoice when your receive the post confirmation containing the url to your new Posterous blog post

In step 3, be sure to make the subject of the email descriptive enough for the code you are sharing.  This will become the title of your posterous blog post.  Here’s what the final gist drop looks like on Posterous.

In case you haven’t looked into code sharing yet, here are a few to get you started.  I wanted to keep this brief, so be sure to check these out on your own to decide which you like best.  If you feel that I missed any noteworthy services, please leave a comment below.

Service Languages Sharing Example
Naslu Zero, just plain text direct url, embed code http://www.naslu.com/resource.aspx?id=392
Pastie Good amount direct url, embed code http://pastie.org/580931
Snipt Freaking ton direct url, embed, twitter, delicious, google, stumbleupon, email http://snipt.org/llln
Snipplr Freaking ton direct url, embed code http://snipplr.com/view/18198/sourcecode-for-ifartaircom-air–flex-soundboard/
Tblurb Good amount direct url http://tblurb.com/2xHKxq
Gist.Github Plenty for you direct url, embed, posterous.com integration http://gist.github.com/152302
DZone Snippets Zero, just plain text direct url http://snippets.dzone.com/posts/show/7695