nowfound

Dev tools · March 14, 2022

HA

HN Avatars in 357 bytes

Paste the following into the console of any HN page - for annotated avatars on all HN comments. (self contained code) for(u of document.querySelectorAll('.hnuser'))for(u.prepend(c=document.createElement('canvas')),x=c.getContext('2d'),c.width=18,c.height=14,s=u.innerText,r=1,i=28+s.length;i--;i>>29>X*X/3+Y/2&&x.fillRect(6+2*X,2*Y,2,2)&x.fillRect(6-2*X,2*Y,2,2):r+=s.charCodeAt(i-28,x.fillStyle='#'+(r>>8&0xFFFFFF).toString(16)))r^=r>>17,r^=r>2

Alternativestop 1% of March 2022

In plain words

HN Avatars in 357 bytes is a developer tool that generates unique visual avatars for Hacker News users based on their usernames. Users paste a single line of self-contained JavaScript code into the browser console on any HN page to add small colored pixel avatars next to all comments. The tool creates distinct, procedurally generated graphics for each user without requiring external resources, making it lightweight and immediately functional.

written from the facts on this page · September 2026

From the sources

In the maker’s words, at launch

Paste the following into the console of any HN page - for annotated avatars on all HN comments. (self contained code) for(u of document.querySelectorAll('.hnuser'))for(u.prepend(c=document.createElement('canvas')),x=c.getContext('2d'),c.width=18,c.height=14,s=u.innerText,r=1,i=28+s.length;i--;i<28?r>>>29>X*X&#x2F;3+Y&#x2F;2&&x.fillRect(6+2*X,2*Y,2,2)&x.fillRect(6-2*X,2*Y,2,2):r+=s.charCodeAt(i-28,x.fillStyle='#'+(r>>8&0xFFFFFF).toString(16)))r^=r<<13,r^=r>>>17,r^=r<<5,X=i&3,Y=i>>2

More dev tools this month

the category →
  • Dograh592

    The open source VAPI alternative

    Dev tools · 25d ago · dograh.com

  • Meridian530

    Don't let your work go unnoticed. Get promoted!

    Dev tools · 20d ago · meridiona.com

  • x1516

    Lovable for iPhone apps go from idea to App Store

    Dev tools · 11d ago · x1.new

  • Open-source GTM skills for technical founders

    Dev tools · 29d ago · gtmcofounder.com

  • Nuphos380

    The AI-Native DevOps Workspace.

    Dev tools · 24d ago · nuphos.ai

  • Track your AI visibility for free (using your own API keys!)

    Dev tools · 25d ago · lettertrace.com

Launched alongside, March 2022

the whole month →
  • IM

    Hi HN! I made many small web games in the past with Unity or Phaser. But this time I wanted to make something completely on my own. So I coded a basic game framework in plain JavaScript, and used it to make Almost Pong. This was a really fun project that taught me a lot about JavaScript, and I plan to make more minimalist games with this framework. Interesting fact: Almost Pong doesn't load any assets, all sprites and sounds are generated with code. Happy to answer questions, and please let me know if you have any feedback on the game. Thanks!

    Dev tools · 2022 · lessmilk.com

  • IM

    Life & fun · 2022 · networksfromscratch.com

  • Tome Beta697

    The storytelling tool for work

    Work · 2022 · tome.app

  • Kairn694

    Regain control over your days

    Dev tools · 2022

  • AG

    Life & fun · 2022 · backofyourhand.com

  • Summari625

    Instantly summarize any article or webpage in one click

    AI · 2022