Created
June 7, 2011 19:47
-
-
Save zporter/1012985 to your computer and use it in GitHub Desktop.
Nice little hash / password generator for Ruby 1.9
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
(('a'..'z').to_a + ('A'..'Z').to_a + (0..9).to_a).sample(30).join #=> "yh8D5NrognVw16GldXPcCxJ24ALU3W" | |
# with special characters | |
(('a'..'z').to_a + ('A'..'Z').to_a + (0..9).to_a + ['!','@','#','$','%','^','&','*']).sample(30).join #=> "Nc&inVolamjMLWfsE#k6$D^p2!b@XC" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment