WORK, WRITING, STUFF

The blog here is made out of blog.

Welcome to my little corner of the internet. Enjoy some writings about various things about, but not limited to tech.

Secure S3 Images with ClerkUse Clerk auth from Lambda-at-Edge to secure your S3 images, and protect uploads, without wrecking your cache. In other words, images go brrr... securely.
How I built AI chat back in 2023No model training; Off-the-shelf GPT 3.5 and some clever retrieval augmented generation.
On Durable ObjectsSome notes and observations on Cloudflare’s globally distributed and strongly consistent coordination API.
How to Build & Publish a Terraform ProviderDocumenting the critical and secondary dependencies to building and publishing a Terraform provider to the Terraform registry, based on my recent experience.
Infinite Databases with Nomad and TraefikI managed to spin up multiple PostgreSQL databases on the fly, each with their own unique URL. Inspired by Neon, PlanetScale and Railway.
The biggest boon to my software careerA reflection on how three individuals have impacted my career in the past year.
Ok, PackerAfter manually installing Nomad, Docker, Git, and ZSH on 3 EC2 instances, it was time to see if Packer could automate the process for me.
My First Nomad ClusterMy own notes — not a guide — on standing up my first Nomad cluster on AWS.
GitHub Actions Survival SkillsAfter close to a year of working with GitHub actions, I’ve compiled a list of handy “survival skills” that help to keep developer velocity high.
Deploy any Web App to Lambda in 60 secondsIf it listens on a port, it can be deployed to Lambda!
Serverless Brain Dump: Use Lambda with RDS Aurora ServerlessPart 1 of 3 in a serverless discovery brain dump. This portion focuses on the Lambda (compute) and Aurora (database) layers within the larger picture: FQDN → API Gateway → Lambda → Aurora.
Deploying a GraphQL Docker Container to AWS Lambda with WaypointI finally got around to ticking off a few items on my todo list. 1. Shoving an express.js app into a lambda function. 2. Deploying a Docker container to lambda. 3. Using a new HashiCorp product. ...And it all required very little code. Sort of.
nextjs-componentsEarly last year, I began transcribing the react components from Vercel's component library site for use on my personal site. It was initially closed source but now in 2022, I decided to open source it. This is a reflection of how I tackled it and some thoughts and learnings I had along the way.
Tree CLI & Benchmarks(Re)creating a CLI tool to print directory contents in a tree-like format. And then some benchmarking.
Dynamic Matrices in GitHub Actions...from JSON payloads that you send! — This was a recent rabbit hole 🐰🕳 that took me 2 days to figure out. I couldn't find a quick and clear answer on Google so I figured I'd write about it.
CloudFront Functions for an Efficient Cache PolicyUsing CloudFront functions to apply some clever and sensible Cache-Control headers to a fully static Next.js app.
Hexagonal Geospatial GPS Data Visualization AppUsing Uber's H3, React Native, and DynamoDB to build a serverless system, end-to-end, to track and visualize my own GPS locations
CSV To DynamoDBThe AWS Python SDK (Boto3) provides a “batch writer”, not present in the other language SDKs, that makes batch writing data to DynamoDB extremely intuitive.
Micro Frontends in NextJS with Webpack 5Webpack 5's Module Federation makes creating micro frontends straightforward. It is also available in NextJS 10+ via an experimental feature flag and it makes integrating micro frontends a breeze. You first build an external micro frontend and deploy it as a "federated module" to your destination of choice. Then you update some configs in your NextJS application and Webpack does the rest. It's kind of magic 🦄.
25.33% Reduction in First Load JS with NextJS Dynamic ImportsA play by play in successfully reducing first load JS bundle size by 25% with code splitting via dynamic imports, and getting all NextJS pages into the green zone.
JAMStack CI/CD with Lerna, NextJS, CDK, and Github ActionsLerna, AWS CDK, and Github Actions make continuous integration and continuous delivery super easy. I figured out how to setup a CI/CD pipeline for my NextJS static apps backed by additional AWS infrastructure like Lambda functions, API Gateway, and Dynamo DB.
Infrastructure as Code To Save TimeI found myself repeating some tedious tasks within the AWS console, week after week, and wanted to stop suffering. Infrasructure-as-code was the way to go but I knew I didn't want to learn Cloud Formation, and I was too lazy to pick up yet another 3rd party tool like Terraform.