8000 GitHub - blemli/untaken: the name is the game [2158] · GitHub
[go: up one dir, main page]

Skip to content
blemliPublic

About

the name is the game [2158]

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

untaken

the name is the game

untaken

Type a name and watch 200 tiles: 🟢green is free, 🔴red is taken

🟠Orange: probably,

🟣Purple: Disallowed,

🟡Yellow: Check yourself and save with the ✓ and ✗ buttons.

run

gh repo clone blemli/untaken && cd untaken
uv venv && uv pip install -r requirements.txt
.venv/bin/python untaken.py        # http://127.0.0.1:8080

deploy

kamal setup   # first time only, afterwards: kamal deploy

Secrets come from 1password (op signin), see .kamal/secrets. DNS: untaken.problem.li → webhost.

add a checker

A checker is a few lines of yaml in sites/. That is the whole pull request:

github:                             # the key is also the icon slug on simpleicons.org
  url: https://github.com/{}        # {} = the name
  signup: https://github.com/signup # where "sign up to all" goes. a {} prefills the name where the site takes it
  taken: {status: 200}              # evidence for taken
  free: {status: 404}               # evidence for free
  chars: a-z0-9-                    # what a name may be made of - else the tile turns purple and says so
  length: 1-39
  known: github                     # a name that is taken, for the canary
  • strategies judge the evidence: status, contains, lacks, matches (regex), lands (regex on the final url). One more = one function in check.py.
  • verdicts: taken, free, and for softer evidence probably_taken, probably_free.
  • transports: url (+ method, headers, json, data, follow: false), whois (+ query), smtp (+ rcpt).
  • optional: name, icon, link (what humans open), valid + hint (regex for odd shapes), fallback (a second source), manual: reason (no server gets in - the user decides).
./check.py github            # show the evidence for the known and a random name
./check.py github somename
./icons.py                   # fetch missing brand icons into icons.svg
uv pip install pytest && .venv/bin/pytest   # every checker against its live site

Pills live in presets.yaml, region: [CH] makes one the default for a country.

architecture

  • exact or honest: a verdict needs positive evidence for exactly one side. A block page, a captcha, a timeout: yellow, never a guess.
  • canary: every hour each checker must tell its known name from a random one, else it answers yellow until it is green again. canary red: <site> goes to logli as a warning, so a checker that stays broken gets noticed. /canary shows the state.
  • your names stay yours: the search is a POST (no name in a url or a log), verdicts live in ram for one hour, the history lives in your browser. sqlite only counts country × site to learn what a region cares about - that sorts the grid.
  • strategy pattern in 124 lines, the app in 127, the page in one file without a framework or a build step. The sites are data.
  • sites/80-more.yaml is generated by ./sherlock.py from sherlock (MIT): whatever passes the canary three times, the most popular first (tranco), until the grid holds 200.
  • icons: simple-icons (CC0), one sprite. Country: geoip2fast. Logs: lossy udp to logli.

caveats

  • "free" on a profile page means nobody shows up there. Reserved, banned or deleted names can still be refused at sign-up - where that is known the tile is orange.
  • instagram, reddit, ebay, ricardo, etsy and alternativeto wall off servers: always yellow. producthunt is yellow until PRODUCTHUNT_TOKEN is set (see .kamal/secrets).
  • "sign up to all" opens many tabs - the browser asks once to allow pop-ups.

About

the name is the game [2158]

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0