Writing a Recursive Utility Type in TypeScript

Writing a Recursive Utility Type in TypeScript

Airbnb has an internal GraphQL server called Viaduct. A feature of Viaduct is that for any response it returns, it adds a __typename for every object which corresponds to the name of its type.

Is it possible to remove them without rewriting the type definition by hand?

Read more →

RFC: Squeal Specification (Draft)

Squeal is a library designed to allow querying raw SQL directly from the front-end without compromising security. This document intends to formalize the design for the Squeal library and eventually become a complete specification.
Read more →

The State of Copy-Pasting in JavaScript

The State of Copy-Pasting in JavaScript
I recently did some work on a VS Code extension whose purpose is to handle rich pastes. It prompted me to survey different copy-pasting libraries and the state of the NPM ecosystem as a whole.
Read more →

PageSpeed for NGINX – Fresh Debian Packages

PageSpeed for NGINX -- Fresh Debian Packages

While Google does publish scripts to help with the installation, it requires a non-trivial depth of knowledge to do right. After struggling with it for many hours, I wrote a guide for personal future reference.

I recently returned to those notes to entirely automate the process using GitHub Actions. The work is open-source and available on GitHub.

Read more →

Adding WSL Support to a VS Code Extension

Adding WSL Support to a VS Code Extension

IDEs will give you the world as long as you stay inside of it. VS Code makes file management a breeze in your workspace but bringing in anything from the outside world will not be frictionless. Inserting a screenshot into a markdown document within VS Code is a multi-step process:

  1. Take the screenshot
  2. Save the screenshot in a folder
  3. Locate the screenshot in file explorer
  4. Drag-drop the screenshot into VS Code
  5. Reference the screenshot from the markdown document

Nowhere near as seamless as Microsoft Word handles pasting images. What if there was an extension that could handle pastes directly?

Read more →