Welcome To Snipplr


Everyone's Recent Snippets Tagged ruby



Download the Credit Card Library from Lucas Carlson user$ sudo gem install creditcard
6 2770 posted 18 years ago by chrisaiv
First things First you need to install this ruby gem user$ sudo gem install ezcrypto
2 1517 posted 18 years ago by chrisaiv
Before you save a password to a database, it may make sense to encrypt it. That way when you do some user authentication, you can compare the users submitted password to the one on the database.
1 1726 posted 18 years ago by chrisaiv
https://www.chrisjmendez.com/2007/10/15/ruby-parse-delicious-rss-feeds/
2 1930 posted 18 years ago by chrisaiv
https://www.chrisjmendez.com/2017/10/15/ruby-web-2-0-name-generator/
1 1193 posted 18 years ago by chrisaiv
0 1213 posted 18 years ago by vanne
1 1323 posted 18 years ago by lmcdougall
2 1477 posted 18 years ago by lmcdougall
2 1854 posted 18 years ago by lmcdougall
0 1202 posted 18 years ago by vanne
Use this to upload and resize your images using RMagick. Code by nixnewbie.
2 1929 posted 18 years ago by Tricon
0 1376 posted 18 years ago by vanne
0 1193 posted 18 years ago by vanne
The escape_javascript funtion is taken from Rails (http://rails.rubyonrails.com/classes/ActionView/Helpers/JavaScriptHelper.html#M000633). Most of the work on this was done by pnomolos and n00ge on the E Text Editor forums.
1 1556 posted 18 years ago by charlesroper
This is an extension to Ruby's String class. Just put this code in a file and include it. This basically takes a string and adds literals and padding to it. For example, you can format a phone number with optional area code like this: "5445556...
1 1668 posted 18 years ago by Agent
0 1154 posted 18 years ago by vanne
A quick and simple way of having any flash messages, from railscast #18
1 1253 posted 18 years ago by bordalix
Since there is no convenient way to clear the console in irb on windows, we can simple emulate the dos cls function
1 3033 posted 18 years ago by vanne
0 1277 posted 18 years ago by dbug13
Just a quick command-line utility to check inflation values from US statistics office.
1 2738 posted 18 years ago by jarjar2k7
1 1257 posted 18 years ago by jpowell
This is an easy to use any helpers that rails provides in any other place besides views and view helpers
1 1415 posted 18 years ago by vanne
This redirects visitors to a new URL using a 301 redirect. Using a 301 redirect is the safest way to let search engines like Google, Yahoo!, Live and Ask know your address has changed.
3 2948 posted 18 years ago by jonhenshaw
Put this in environment.rb to use in your whole app or the console
1 1403 posted 18 years ago by vanne
This allows you to search any INSTANCE or CLASS methods of any objects including rails models, which is helpful if you want to see the methods that you created yourself.
1 1268 posted 18 years ago by vanne
2 1356 posted 18 years ago by gtcaz
Requires wget and curl.
2 1629 posted 18 years ago by gtcaz
1 1225 posted 18 years ago by jordanbrock