Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View mdp.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/usr/bin/ruby
# Prints out a memorable password.
#
# Example:
# $ mdp
# Kasubian704
# $ mdp 3
# trefle173
# semilunar557
# derride305
 
(ARGV.first or 1).to_i.times {
puts open('/usr/share/dict/words') { |f|
f.inject { |choice, line| rand < 1/f.lineno.to_f ? line : choice }.to_s.strip
} + (rand * 1000).round.to_s
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.