Skip to content

Instantly share code, notes, and snippets.

/answer.md Secret

Created August 15, 2011 13:14
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 anonymous/8e82e7f5fb1a3e58103d to your computer and use it in GitHub Desktop.
Save anonymous/8e82e7f5fb1a3e58103d to your computer and use it in GitHub Desktop.

Figured it out.

HINTS = ["a", "s", "d", "f", "g", "h", "j", "k", "l", ";"]


$(document).bind "keydown", "f", ->
  anchors = $("a").length # say 19

  allHints = ->
    for i in [0..anchors]
      if i >= 10
        HINTS[Math.floor(i / 10) - 1] + HINTS[i % 10]
      else
        HINTS[i]

will output
["a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "aa", "as", "ad", "af", "ag", "ah", "aj", "ak", "al", "a;", "sa", "ss"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment