Skip to content

Instantly share code, notes, and snippets.

@Im0rtality
Forked from friggeri/haiku
Last active August 29, 2015 13:57
Show Gist options
  • Save Im0rtality/9702982 to your computer and use it in GitHub Desktop.
Save Im0rtality/9702982 to your computer and use it in GitHub Desktop.

Revisions

  1. Im0rtality revised this gist Mar 22, 2014. 2 changed files with 11 additions and 2 deletions.
    11 changes: 11 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    # Haiku name generator

    [Original](https://gist.github.com/afriggeri/1266756) 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
    2 changes: 0 additions & 2 deletions haiku.js
    Original file line number Diff line number Diff line change
    @@ -24,5 +24,3 @@ haiku = function () {
    rnd = Math.floor(Math.random() * Math.pow(2, 12));
    return adjs[rnd >> 6 % 64] + '-' + nouns[rnd % 64];
    }

    console.log(haiku())
  2. Im0rtality revised this gist Mar 22, 2014. 1 changed file with 12 additions and 10 deletions.
    22 changes: 12 additions & 10 deletions haiku.js
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,15 @@
    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"],
    "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",
    @@ -18,7 +19,8 @@ haiku = function () {
    "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"];
    "frog", "smoke", "star"
    ];
    rnd = Math.floor(Math.random() * Math.pow(2, 12));
    return adjs[rnd >> 6 % 64] + '-' + nouns[rnd % 64];
    }
  3. Im0rtality revised this gist Mar 22, 2014. 2 changed files with 26 additions and 26 deletions.
    26 changes: 0 additions & 26 deletions haiku
    Original file line number Diff line number Diff line change
    @@ -1,26 +0,0 @@
    haiku = ->
    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"
    ]
    rnd = Math.floor(Math.random()*Math.pow(2,12))
    "#{adjs[rnd>>6%64]}_#{nouns[rnd%64]}"
    console.log haiku()
    26 changes: 26 additions & 0 deletions haiku.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    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"];
    rnd = Math.floor(Math.random() * Math.pow(2, 12));
    return adjs[rnd >> 6 % 64] + '-' + nouns[rnd % 64];
    }

    console.log(haiku())
  4. @friggeri friggeri created this gist Oct 6, 2011.
    26 changes: 26 additions & 0 deletions haiku
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    haiku = ->
    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"
    ]
    rnd = Math.floor(Math.random()*Math.pow(2,12))
    "#{adjs[rnd>>6%64]}_#{nouns[rnd%64]}"
    console.log haiku()