Snippets I Have Known
by Sean Cribbs
You may not have encountered it yet, but DZone Snippets is a wonderful service. Recently I have taken to posting some short ‘recipes’ of mine there. I have one that is really old – back from last year I think – but the rest are very recent, and much better code, I might add! Plus, I get a little kick seeing them show up in the “Ruby Heroes sayeth…” sidebar on Peter Cooper’s RubyInside blog. Here’s some of my recent snippets:
- Export Adobe FDF and XFDF from ActiveRecord
- Turn CSV with headers into Array of Hashes
- Compress your ActiveRecord sessions
- Make a remote URL work like a file upload
There’s also a bunch of stuff under the rails and ruby tags, but caveat emptor. Many of those snippets are like my first one… very sophomoric and not the Rails way.
Here’s all of my snippets in one page. Start posting your own snippets!
Sidenote: I realize many of you come to this site looking for my presentation slides. I apologize about the downtime, but I have set my Mongrel to restart every hour, so it should be up more often now.