Skip to content

Instantly share code, notes, and snippets.

@vu2
Created June 22, 2015 05:54
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 vu2/874ba4cabffa93b19266 to your computer and use it in GitHub Desktop.
Save vu2/874ba4cabffa93b19266 to your computer and use it in GitHub Desktop.
str_array = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a
random_token = ( Array.new(32){ str_array[rand(str_array.size)] } ).join
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment