stevenwilkin (owner)

Revisions

gist: 202949 Download_button fork
public
Public Clone URL: git://gist.github.com/202949.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env ruby
 
# random_password.rb
# generate a random string of 12 alphanumeric characters
# Steven Wilkin @stevebiscuit
 
chars = ('0'..'9').to_a + ('A'..'Z').to_a + ('a'..'z').to_a
 
12.times {print chars[rand(chars.length)]}
puts