Created
November 14, 2012 17:54
-
-
Save jeremy2/4073660 to your computer and use it in GitHub Desktop.
generate a string of random alpha-numeric characters suitable as a password
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
# inspired by http://stackoverflow.com/questions/88311/how-best-to-generate-a-random-string-in-ruby | |
(0...16).map{ (('a'..'z').to_a + (0..9).to_a)[rand(36)] }.join |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment