Skip to content

Instantly share code, notes, and snippets.

@stephencelis
Created March 29, 2009 16:16
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 stephencelis/87453 to your computer and use it in GitHub Desktop.
Save stephencelis/87453 to your computer and use it in GitHub Desktop.
require "rubygems"
require "haddock"
Haddock::Password.generate # => "bowl9&bracky"
include Haddock # (Make things easier on our fingers...)
Password.generate(30) # => "Phlebotomus2473?nonconditioned"
Password.generate(8) # => "amy7@rax"
# To use a custom (newline-delimited) word list:
#
# Password.diction = "/path/to/words"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment