Created
November 29, 2011 12:12
-
-
Save karlwestin/1404606 to your computer and use it in GitHub Desktop.
Generating 10000 random codes in ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'digest/sha1' | |
(1..10000).map {|n| (Digest::SHA1.hexdigest (n*rand).to_s)[1..8]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment