tag: js

13 min read
I wanted to play with state machines and requestAnimationFrame in vanilla JS, so I came up with the idea of a simple countdown clock.
1 min read
You know the story. You try to do npm install hipster-package on OS X and you get a whole load of errors; the easy way out is to just use sudo npm install. Everyone, however, keep saying how that is bad idea. But how do you make npm work without sudo? It's quite simple actually
1 min read
To have a $ in your replace strings in Javascript regular expressions, it needs to be escaped with another $