Skip to content

Instantly share code, notes, and snippets.

@freshvolk
Forked from Im0rtality/README.md
Created March 1, 2015 01:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freshvolk/88eb89d9fc1d8233899c to your computer and use it in GitHub Desktop.
Save freshvolk/88eb89d9fc1d8233899c to your computer and use it in GitHub Desktop.

Haiku name generator

Original was in coffeescript, so I simply converted to JS to run in browser without dependencies.

Usage

  1. Open browser console
  2. Paste script above and hit enter
  3. Type haiku() to generate name
  4. Click Arrow up and then Enter to generate another one
  5. Profit
haiku = function () {
var adjs = [
"autumn", "hidden", "bitter", "misty", "silent", "empty", "dry", "dark",
"summer", "icy", "delicate", "quiet", "white", "cool", "spring", "winter",
"patient", "twilight", "dawn", "crimson", "wispy", "weathered", "blue",
"billowing", "broken", "cold", "damp", "falling", "frosty", "green",
"long", "late", "lingering", "bold", "little", "morning", "muddy", "old",
"red", "rough", "still", "small", "sparkling", "throbbing", "shy",
"wandering", "withered", "wild", "black", "young", "holy", "solitary",
"fragrant", "aged", "snowy", "proud", "floral", "restless", "divine",
"polished", "ancient", "purple", "lively", "nameless"
],
nouns = [
"waterfall", "river", "breeze", "moon", "rain", "wind", "sea", "morning",
"snow", "lake", "sunset", "pine", "shadow", "leaf", "dawn", "glitter",
"forest", "hill", "cloud", "meadow", "sun", "glade", "bird", "brook",
"butterfly", "bush", "dew", "dust", "field", "fire", "flower", "firefly",
"feather", "grass", "haze", "mountain", "night", "pond", "darkness",
"snowflake", "silence", "sound", "sky", "shape", "surf", "thunder",
"violet", "water", "wildflower", "wave", "water", "resonance", "sun",
"wood", "dream", "cherry", "tree", "fog", "frost", "voice", "paper",
"frog", "smoke", "star"
];
var rnd = Math.floor(Math.random() * Math.pow(2, 12));
return adjs[rnd >> 6 % 64] + '-' + nouns[rnd % 64];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment