Skip to content

@sunny /mdp.rb
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
#!/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.