Welcome To Snipplr


Everyone's Recent Ruby Snippets Tagged ruby



1 2 3 4 5 ... 9
0 2381 posted 15 years ago by Shamaoke
Digs through the exim log and gives a count for every email address that's generating SMTP errors
0 1339 posted 15 years ago by beaknit
Ruby / Rails - A refresher reference for me because I forget how to do this... create project generate scaffold scaffolding migrate db start server
0 2038 posted 15 years ago by brandonjp
links (full <a href="#"> element) to Show Edit Destroy Delete records in view *.erb must be in the record loop:
0 3182 posted 15 years ago by brandonjp
if then statement... in a view file *.html.erb:
0 2581 posted 15 years ago by brandonjp
0 1251 posted 15 years ago by ringingEars
Place script into Automator (select "Run Shell Script" choose /usr/bin/ruby as the shell). You'll need to create a bit.ly account which will give you your API key for authentication.
0 1359 posted 15 years ago by insanedreamer
Call a block if it's given otherwise call a method.
0 1406 posted 15 years ago by Shamaoke
ruby mcm.rb >mcm.sh chmod +x mcm.sh ./mcm.sh
0 1597 posted 15 years ago by hafthor
It's necessary to do this for each of automatic_attrs, override_attrs, normal_attrs and default_attrs
0 1586 posted 15 years ago by therobot
Quick conversion from a string of binary into ascii, and back again.\r\nUse B* for MSB and b* for LSB first.
0 1577 posted 15 years ago by jimbobmcfred
0 1230 posted 15 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 1550 posted 15 years ago by dom111
0 1134 posted 15 years ago by rkumar
0 1248 posted 15 years ago by rkumar
0 1173 posted 15 years ago by rkumar
0 1488 posted 15 years ago by viatropos
0 1321 posted 15 years ago by therobot
0 1426 posted 15 years ago by viatropos
1 2 3 4 5 ... 9