Skip to content

Instantly share code, notes, and snippets.

@WA9ACE
Created December 12, 2012 20:18
Show Gist options
  • Save WA9ACE/4271188 to your computer and use it in GitHub Desktop.
Save WA9ACE/4271188 to your computer and use it in GitHub Desktop.
Produces random alphanumeric password.
#!/usr/bin/env ruby
range = (1..9).to_a + ('a'..'z').to_a + ('A'..'Z').to_a
password = range.sample(10).join
puts password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment