Evan Hahn's guides
I’ve written some guides and how-tos. Here they are:
JavaScript
- Publishing a simple package to npm
- Parse URLs with
<a>
tags in JavaScript - Disable ESLint for a file
- Disable JSHint for a file
- When stringify doesn’t return a string
- Why does “👩🏾🌾” have a length of 7 in JavaScript?
- How to use the JavaScript Compression Streams API to (de)compress strings
- What’s the best way to concatenate Uint8Arrays?
- How to use crypto.timingSafeEqual with strings
- How to reverse an array
- Remove one element by index from JavaScript array
- Randomly generate either -1 or 1
- Overwriting document.head in strict mode on Safari
- Should you use semicolons in JavaScript?
- Newline necessary at the end of JavaScript files?
- Working with the UTF-8 bytes of JavaScript strings
- Getting the UTF-16 bytes of JavaScript strings
- Getting the UTF-32 bytes of JavaScript strings
Express
- Understanding Express.js or the book Express.js in Action
- Gotchas with Express query parsing (and how to avoid them)
- You might not need Helmet.js
- A deep dive into Express’s static middleware
- Conditional Express middleware
- How to block Google’s FLoC tracking with Express
CoffeeScript
Python
- Skip the header of a file with Python’s CSV reader
- How to read tab-separated values (TSV) files in Python
iOS
- Disable SwiftLint for a file
- How does Swift decode “weird” JSON numbers?
- Converting UIColors to CSS colors
Clojure
Crystal
Tools
Vim
Other
- Play a jingle on Git commits
- systemd-inhibit: a built-in Linux alternative to macOS’s
caffeinate
command - Disable the beer emoji in Homebrew
- Install Node Version Manager without the “source” line
- Cancel a git-flow branch
- Remember The Milk script to export tasks as CSV
- Remember The Milk script to find tasks with invalid start times
- Remember The Milk script to estimate selected tasks