Skip to content

Instantly share code, notes, and snippets.

@gugod
Created November 20, 2012 20:38
Show Gist options
  • Save gugod/4120921 to your computer and use it in GitHub Desktop.
Save gugod/4120921 to your computer and use it in GitHub Desktop.
global <<< require \prelude-ls
require! fs
dictwords = lines fs.readFileSync "/usr/share/dict/words", "utf8"
pick = (ar) -> ar[ floor Math.random() * length ar ]
pwgen = -> concatMap (-> pick dictwords), [1]*4
console.log pwgen!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment