Blog Page #2
Here you'll find everything I've written for this site, all in one place, from newest to oldest. Some posts are deep dives, while others are just quick notes and fixes I wanted to remember. Feel free to dig in, and I hope you find something useful or interesting.
-
I needed a way to manage database tables in Rust. These are my notes on using sea-orm-cli to set up and run my first migration with SeaORM.
-
A quick note to myself on Rust's
?
operator. It's a cleaner way to handle Result types by propagating errors instead of using a match block. -
Just a simple note to myself on the size of common Solidity types. A quick reference table for when I'm writing or auditing smart contracts.
-
A quick reference for Solidity proxy patterns. This is my breakdown of Transparent vs. UUPS, comparing gas overhead and the location of the upgrade logic.
-
Figuring out how to test on multiple chains with Foundry. My notes on using vm.createFork to set up different network forks inside my test files.
-
My quick reference for fetching an ETH balance using Ethers.js. It's way easier than calling the
eth_getBalance
RPC and converting the hex value. -
My personal notes on creating a reusable tsconfig for my TypeScript projects. The trick is to publish the base config files as a simple NPM package.
-
A quick reference for building a single TypeScript library for both ESM and CJS. Here's the
package.json
exports and tsconfig setup I use. -
This is how I added the JSON-LD Article Schema to my Eleventy blog. My notes on installing and configuring the eleventy-plugin-schema.
-
A quick reference for creating a shareable Prettier config. Just a simple NPM package with an index.js that exports all my formatting options.
-
Codecov felt slow for my monorepo, so I built my own coverage report site. This is my log on using a simple Node script to collect Jest's HTML reports.
-
Ran into the "Cannot redefine property"
TypeError
in Jest. This is my log on fixing it withjest.mock
or a local barrel file forspyOn
. -
My notes on how to deploy a contract to the same address on multiple chains. The trick is just to use a fresh wallet with the same nonce (0) everywhere.
-
My personal reference for building the profanity tool from source on an M1 Mac. A security note, it's broken, so please don't use it for wallets.
-
My notes on installing the dapptools on M1 Mac. The process involved running under Rosetta and using a specific version of Nix.
-
My sam local
start-api
wasn't hot reloading. This is my quick note on using-t template.yaml
to fix it and--skip-pull-image
to make it faster. -
Setting up a monitoring stack for Sanic. This is my quick reference for hooking up a Prometheus Counter via middleware to track all incoming requests.
-
My experiment with building a hand signal recognizer using a CNN. This is my log on collecting data with a webcam and implementing a LeNet-5-style model in TensorFlow.
-
My note-to-self for writing a UTF-8 tokenizer in Rust. The trick is reading byte-by-byte and only checking for whitespace on single-byte chars.
-
My personal log on a classic C vulnerability. This post is a quick cheat sheet on using printf safely to avoid format string exploits.