Reloading your Ruby on Rails console





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

« Previous 1 2 Next »
1
Date Submitted Mon. Jun. 9th, 2008 4:00 AM
Revision 1
Helper jamesmcm
Tags converter | Ruby
Comments 0 comments
A simple algorithm to convert decimal numbers to binary; pointless since most languages have an inbuilt function but was used for learning about algorithm design.
1
Date Submitted Mon. Jun. 9th, 2008 3:56 AM
Revision 1
Helper jamesmcm
Tags decryption | Ruby
Comments 0 comments
The decrypter for the simple encrypter I posted earlier - Takes the encrypted text from a text file - "encrypt.txt" which the encrypter automatically writes to.
1
Date Submitted Mon. Jun. 9th, 2008 3:54 AM
Revision 1
Helper jamesmcm
Tags Encryption | Ruby
Comments 0 comments
A quick implementation of an encrypter which can't be cracked by frequency analysis.
7
Date Submitted Fri. Jul. 20th, 2007 11:49 PM
Revision 1
Helper lavaramano
Tags "remove string" | cli | console | gnu/linux | Grep
Comments 1 comments
how to remove a string from a plain text using just grep.
5
Date Submitted Thu. Feb. 8th, 2007 1:09 PM
Revision 1
Helper jeremec
Tags "ruby on rails" | fixtures | rails | Ruby
Comments 0 comments
I'm in the process of writing test fixtures for our rails site. A lot of my tests require authentication, so I've had to port our permissions system into a fixture. Rather than type out all of the information for the fixture, I decided to create a nested loop that will take care of this for me.

There's probably a rake task for this, but I wasn't able to find it, so I came up with my own solution. You'll have to do a little cleanup when it's done, however some slight mods to this loop could even eliminate that.
5
Date Submitted Thu. Nov. 30th, 2006 11:40 PM
Revision 1
Beginner ivy7878
Tags address | addresses | country | IP | Ruby
Comments 1 comments
IP2Location is a Ruby library that enables the user to find the country, region, city, coordinates, zip code, ISP and domain name that any IP address or hostname originates from. It has been optimized for speed and memory utilization. Developers can use the API to query all IP2Location™ binary databases for applications written in C or supporting static/dynamic library.
7
Date Submitted Thu. Nov. 2nd, 2006 5:08 AM
Revision 1
Scripter SCoon
Tags Algorithm | Genetic | optimization | Random | Ruby
Comments 0 comments
This snippet illustrates using Genetic Algorithm for the hardware optimization.
8
Date Submitted Thu. Nov. 2nd, 2006 3:51 AM
Revision 1
Scripter SCoon
Tags Algorithm | Genetic | Random | Ruby
Comments 1 comments
Genetic Algorithm implementation.

See also "Weighted random selection" for RandomItemSelector class source.
7
Date Submitted Thu. Nov. 2nd, 2006 1:49 AM
Revision 1
Scripter SCoon
Tags List | Random | Ruby
Comments 1 comments
Weighted random selection from the list.

Don't forget to call itemsChanged after updating list content.
5
Date Submitted Mon. Oct. 30th, 2006 6:30 AM
Revision 1
Scripter SCoon
Tags Email | http | Mail | RSS | Ruby
Comments 0 comments
This snippet illustrates following:

1. Using http request to get the data
2. Parsing RSS feeds
3. Sending email
« Previous 1 2 Next »