Welcome To Snipplr


Everyone's Recent Ruby Snippets Tagged ruby



1 ... 5 6 7 8 9
This script will setup JBoss 4.2.2 to use null persistence (no DB, see http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigJBossMQNullPersistence) when handling JMS messages.
1 1534 posted 18 years ago by narkisr
1 1741 posted 18 years ago by vanne
1 1461 posted 18 years ago by vanne
Courtesy of Jesse.
2 2192 posted 18 years ago by ches
1 1499 posted 18 years ago by jhenry
https://www.chrisjmendez.com/2007/10/22/ruby-simple-example-of-threading/
3 3477 posted 18 years ago by chrisaiv
https://www.chrisjmendez.com/2007/10/21/ruby-how-to-iterate-through-an-array/
3 3306 posted 18 years ago by chrisaiv
https://www.chrisjmendez.com/2007/10/21/converting-an-array-into-yaml-loading-yaml-into-an-array/
1 3153 posted 18 years ago by chrisaiv
There are many functions available for Time, Month, Day, and Year. Below are a few examples I use frequently
1 1935 posted 18 years ago by chrisaiv
Download the Credit Card Library from Lucas Carlson user$ sudo gem install creditcard
6 3088 posted 18 years ago by chrisaiv
First things First you need to install this ruby gem user$ sudo gem install ezcrypto
2 1801 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 2003 posted 18 years ago by chrisaiv
https://www.chrisjmendez.com/2007/10/15/ruby-parse-delicious-rss-feeds/
2 2200 posted 18 years ago by chrisaiv
https://www.chrisjmendez.com/2017/10/15/ruby-web-2-0-name-generator/
1 1393 posted 18 years ago by chrisaiv
1 1597 posted 18 years ago by lmcdougall
2 1764 posted 18 years ago by lmcdougall
2 2167 posted 18 years ago by lmcdougall
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 1829 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 1950 posted 18 years ago by Agent
Since there is no convenient way to clear the console in irb on windows, we can simple emulate the dos cls function
1 3400 posted 19 years ago by vanne
Just a quick command-line utility to check inflation values from US statistics office.
1 3046 posted 19 years ago by jarjar2k7
1 1501 posted 19 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 1700 posted 19 years ago by vanne
Put this in environment.rb to use in your whole app or the console
1 1664 posted 19 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 1524 posted 19 years ago by vanne
1 ... 5 6 7 8 9