Welcome To Snipplr


Everyone's Recent Ruby Snippets Tagged c



Quick conversion from a string of binary into ascii, and back again.\r\nUse B* for MSB and b* for LSB first.
0 2043 posted 16 years ago by jimbobmcfred
0 1687 posted 16 years ago by rkumar
I’ve recently had to parse some pretty large XML documents, and needed a method to read one element at a time. Here’s a fairly simple solution in Ruby form.
0 1976 posted 16 years ago by dom111
0 1572 posted 16 years ago by rkumar
0 1639 posted 16 years ago by rkumar
0 1586 posted 16 years ago by rkumar
1 2046 posted 16 years ago by nhocki
0 1933 posted 16 years ago by viatropos
0 1776 posted 16 years ago by therobot
0 1841 posted 16 years ago by viatropos
0 1760 posted 16 years ago by pdxmph
Easy way to populate a drop-down menu
3 3126 posted 16 years ago by chrisaiv
validate :price_must_be_at_least_a_cent protected def price_must_be_at_least_a_cent errors.add(:price, 'should be at least 0.01') if price.nil? || price < 0.01 end
0 1778 posted 16 years ago by stayce
This Ruby script generates the [Gnome Terminals For Rails script](http://snipplr.com/view/32227/gnome-terminals-for-rails/ "Gnome Terminals For Rails").
0 1539 posted 16 years ago by draq
0 1858 posted 16 years ago by inkdeep
0 2377 posted 16 years ago by inkdeep
0 1575 posted 16 years ago by inkdeep