Skip to content

Instantly share code, notes, and snippets.

@marano
Created November 7, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marano/3b228fdce1b3b777fac2 to your computer and use it in GitHub Desktop.
Save marano/3b228fdce1b3b777fac2 to your computer and use it in GitHub Desktop.
Generate random secret
all_characters = [('a'..'z'), ('A'..'Z'), (0..9)].map { |i| i.to_a }.flatten
secret = (0...100).map { all_characters[rand(all_characters.length)] }.join
puts secret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment