Skip to content

Instantly share code, notes, and snippets.

@ericvolp12
Last active October 9, 2024 06:45
Show Gist options
  • Save ericvolp12/2733424a79a28979d08a278c152ed52f to your computer and use it in GitHub Desktop.
Save ericvolp12/2733424a79a28979d08a278c152ed52f to your computer and use it in GitHub Desktop.
websocat wss://jetstream.atproto.tools/subscribe | jq --unbuffered '.commit.collection | select( . != null )' | node -e 'console.clear();mv=0,c={},{log}=console,new readline.Interface({input:process.stdin}).on("line",e=>{u=c[e]=(c[e]||0)+1,mv=mv>u?mv:u;process.stdout.write("\033[H");Object.keys(c).sort((a,b)=>c[b]-c[a] || a.localeCompare(b)).forEach(k=>{v=c[k];log(`${k.padEnd(30)} ${"█".repeat(1+60*v/mv)} `.padEnd(100," ")+v)});log()})'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment