Skip to content

Instantly share code, notes, and snippets.

@hannestyden
Created February 24, 2010 20:35
Show Gist options
  • Save hannestyden/313820 to your computer and use it in GitHub Desktop.
Save hannestyden/313820 to your computer and use it in GitHub Desktop.
# Ruby 1.9
(0...8).map { (@__alphanums ||= [ ('a'..'z'), ('A'..'Z'), ('0'..'9') ].map { |r| r.to_a }.flatten).sample }.join
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment