Latest posts

  • How I Deployed a Node.js App on a Cheap VPS with Nginx, HTTPS, and PM2 (Part 1: Server Setup)

    How I Deployed a Node.js App on a Cheap VPS with Nginx, HTTPS, and PM2 (Part 1: Server Setup)

    Deploy a Node.js App on a Cheap VPS: Server Setup (Part 1) | SpiritCode” meta_description: Managed hosting is convenient, but the bill adds up fast once you have a few small projects. I moved one of my Node.js apps to a low-cost VPS, and I want to show you exactly how I did it, step…

    Read more

  • How I Automated Sales Tax Reports by State With Python and pandas

    How I Automated Sales Tax Reports by State With Python and pandas

    Learn how to turn a Shopify, Stripe or Square export into a monthly sales tax report by state, with an economic nexus check, using Python and pandas. Full code included. If you sell online to customers across the US, you already know the pain: every month you need to know how much you sold and…

    Read more

  • i Automated Invoice Follow-Ups for a Small US Business With Python (and Saved 6 Hours a Week)

    i Automated Invoice Follow-Ups for a Small US Business With Python (and Saved 6 Hours a Week)

    Step-by-step Python script that sends invoice reminders automatically via Gmail: before the due date, on the due date, and when payments are late. Full code included. tags: [python, automation, small business, invoices, smtp] I Automated Invoice Follow-Ups for a Small US Business With Python (and Saved 6 Hours a Week) I was helping a small…

    Read more

  • How I Automated a Weekly Sales Report From a CSV With Python (and Emailed It to the Client)

    How I Automated a Weekly Sales Report From a CSV With Python (and Emailed It to the Client)

    A small US business kept building a weekly sales report by hand in Excel. Here’s how I automated it with Python and pandas and emailed it with Gmail’s SMTP. A small business owner I work with was spending about 30 minutes every Monday opening a CSV export from their sales system, summing columns in Excel,…

    Read more

  • How I Deployed a Node.js App on a Cheap VPS With Nginx, PM2, and Free SSL

    How I Deployed a Node.js App on a Cheap VPS With Nginx, PM2, and Free SSL

    I moved a Node.js app from my laptop to a low-cost Ubuntu VPS. Here’s exactly how I set up Nginx, PM2, and a free Let’s Encrypt SSL certificate. I had a small Node.js app running on localhost:3000 and needed it online at a real domain, with HTTPS, for a US client. Managed platforms are convenient,…

    Read more

  • How to Get Reliable Internet on a Farm in Rural Montana Without Cable

    If you live on a farm or ranch in rural Montana, you already know the cable company isn’t coming. I’ve heard “we don’t service that area” so many times I could set it as my ringtone. The good news? You don’t need cable anymore. You can get internet that’s fast enough for video calls, streaming,…

    Read more

  • How to Get Reliable Internet on a Farm in Rural Montana Without Cable

    If you live on a farm or ranch in rural Montana, you already know the cable company isn’t coming. I’ve heard “we don’t service that area” so many times I could set it as my ringtone. The good news? You don’t need cable anymore. You can get internet that’s fast enough for video calls, streaming,…

    Read more

  • Fixing NoClassDefFoundError: org/apache/http/conn/ssl/SSLConnectionSocketFactory in Spring Boot 3

    Fixing NoClassDefFoundError: org/apache/http/conn/ssl/SSLConnectionSocketFactory in Spring Boot 3

    You migrate to Spring Boot 3.2, maybe add spring-boot-starter-webflux along the way, and at runtime you get this: It’s easy to blame the new starter, but WebFlux is almost never the cause. Here’s what the error actually means and how to fix it. What the error means The package name tells you everything: Spring Boot…

    Read more

  • Fixing “Cannot read properties of undefined (reading ‘style’)” in SvelteKit

    Fixing “Cannot read properties of undefined (reading ‘style’)” in SvelteKit

    This error looks scary, but in SvelteKit it almost always comes down to one thing: your code touched a DOM element that wasn’t there yet. Here’s how to tell which case you’re in and how to fix it. One note first: if this started right after you upgraded @sveltejs/adapter-node, the adapter probably isn’t the cause.…

    Read more

  • Why does Next.js 14 fail to parse my multipart/form-data upload, and how do I test it with Burp Suite?

    Why does Next.js 14 fail to parse my multipart/form-data upload, and how do I test it with Burp Suite?

    File uploads look simple until one request refuses to parse. The browser sends the file, the route handler receives it, and then request.formData() throws something like this: Nothing in the message points at the real cause. In most cases I’ve seen, the culprit is a single line in the client code: a hand-written Content-Type header…

    Read more

  • Why does Django 5 raise “ValueError: chunk_size must be provided when using QuerySet.iterator() after prefetch_related()”?

    Why does Django 5 raise “ValueError: chunk_size must be provided when using QuerySet.iterator() after prefetch_related()”?

    This error tends to show up right after a Django 5 upgrade. A batch job that has run quietly for years, usually a report, an export, or a data backfill, suddenly fails on its first line of iteration. The code did not change. The Django version did. The message is accurate, but it does not…

    Read more

  • Fix Angular 17 Ivy Error “Cannot read property ‘ɵɵdefineInjectable’ of undefined” after TS 5.5 Upgrade

    Fix Angular 17 Ivy Error “Cannot read property ‘ɵɵdefineInjectable’ of undefined” after TS 5.5 Upgrade

    descricao: “Learn how to resolve the Angular 17 Ivy compilation error caused by TypeScript 5.5 incompatibility. Step‑by‑step fix and best practices.” # Angular 17 Ivy compilation error “Cannot read property ‘ɵɵdefineInjectable’ of undefined” after upgrading to TypeScript 5.5 I was in the middle of a sprint when our team decided to bump the monorepo’s TypeScript…

    Read more

  • Why Vault Token Renewal Stops After 24h with Kubernetes Auth v2.5.1

    descricao: Learn why HashiCorp Vault token renewal halts after 24 hours using the Kubernetes auth method v2.5.1 and how to fix it. # Why does HashiCorp Vault token renewal stop after 24h when using Kubernetes auth method version 2.5.1 I was knee‑deep in a production rollout of a multi‑tenant service when our monitoring started screaming:…

    Read more

  • Why AWS WAF Shows “blocked: 403 – Missing required header” for API Gateway with Lambda Authorizer v2

    Why AWS WAF Shows “blocked: 403 – Missing required header” for API Gateway with Lambda Authorizer v2

    descricao: “Learn why AWS WAF returns “blocked: 403 – Missing required header” when API Gateway uses Lambda authorizer v2 and how to correctly return the X‑Amzn‑Trace‑Id header.” # Why does AWS WAF log show “blocked: 403 – Missing required header” for API Gateway when using Lambda authorizer v2 I was in the middle of a…

    Read more

  • Spring Boot 3.2 CSRF Token ‘null’ with Thymeleaf Fragments & Angula

    Spring Boot 3.2 CSRF Token ‘null’ with Thymeleaf Fragments & Angula

    descricao: “Fix Spring Boot 3.2 CSRF validation error “Invalid CSRF Token ‘null’ supplied” when using Thymeleaf fragments and an Angular HttpClient interceptor.” # Spring Boot 3.2 fails CSRF validation with “Invalid CSRF Token ‘null’ supplied” when using Thymeleaf fragments and Angular frontend I ran into a nasty CSRF mismatch bug last month while rolling out…

    Read more

  • Why Terraform plan shows Provider version constraints must be a string

    Why Terraform plan shows Provider version constraints must be a string

    descricao: “Learn why Terraform 1.7 shows “Error: Provider version constraints must be a string” after adding version 5.0.0 and how to fix it.” # Why does Terraform plan show “Error: Provider version constraints must be a string” after adding provider version 5.0.0 I was in the middle of a quarterly upgrade cycle for a large…

    Read more

  • Fixing TypeError: Cannot read property ‘client’ of undefined in NestJS with Redis Transport

    Fixing TypeError: Cannot read property ‘client’ of undefined in NestJS with Redis Transport

    descricao: “Learn how to fix the TypeError ‘Cannot read property client of undefined’ in NestJS microservices after upgrading to ioredis 5.4. Step‑by‑step guide with code examples.” # Fixing “TypeError: Cannot read property ‘client’ of undefined” in NestJS microservice when using Redis Transport with ioredis 5.4 I ran into the dreaded `TypeError: Cannot read property ‘client’…

    Read more

  • MongoDB Atlas Change Stream Stops After Replica Set Step‑Down in Kubernetes

    MongoDB Atlas Change Stream Stops After Replica Set Step‑Down in Kubernetes

    descricao: “Learn how to keep MongoDB Atlas change streams alive during primary elections in a Kubernetes StatefulSet deployment.” # MongoDB Atlas Change Stream Stops After Replica Set Step‑Down in Kubernetes StatefulSet I ran into a nasty production‑grade bug last quarter: my microservice, running inside a Kubernetes StatefulSet, would lose its MongoDB Atlas change stream every…

    Read more

  • Why Cloudflare Turnstile Returns error_code=1000 Behind Nginx HTTP/2

    Why Cloudflare Turnstile Returns error_code=1000 Behind Nginx HTTP/2

    descricao: “Learn why Cloudflare Turnstile shows error_code=1000 when run behind an Nginx reverse proxy with HTTP/2 and how to fix it.” # Why does Cloudflare Turnstile return “error_code=1000” when deployed behind an Nginx reverse proxy with HTTP/2 I first ran into the dreaded `error_code=1000` when I tried to protect a legacy admin panel with Cloudflare…

    Read more

  • Resolving “Failed to fetch” CORS error with SameSite=None cookies in Safari 17

    Learn how to fix the Failed to fetch” CORS error in Safari 17 when using fetch API with SameSite=None cookies by configuring Set-Cookie headers and ITP. # Resolving “Failed to fetch” CORS error when using fetch API with SameSite=None cookies in Safari 17 I hit this exact wall last month while rolling out a cross‑origin…

    Read more

  • Docker container scans report false positive CVE‑2024‑XXXX on Alpine 3.20 despite patching

    Docker container scans report false positive CVE‑2024‑XXXX on Alpine 3.20 despite patching

    descricao: “Learn how to configure Trivy and Snyk ignore rules to silence false positive CVE‑2024‑XXXX alerts on Alpine 3.20 Docker images.” I was in the middle of a production rollout for a Go microservice that ships in an Alpine 3.20 base image. The CI pipeline runs Trivy and Snyk on every build, and both tools started…

    Read more

  • Fix “Signature verification failed” in AWS SNS .NET 8 Lambda

    Fix “Signature verification failed” in AWS SNS .NET 8 Lambda

    descricao: “Learn how to fix Signature verification failed errors in .NET 8 Lambda when validating AWS SNS messages caused by certificate chain issues.” # Fixing “Signature verification failed” when validating AWS SNS messages in .NET 8 Lambda I was knee‑deep in a production incident last month when my .NET 8 Lambda started throwing `Signature verification…

    Read more

  • Fix React 18 useTransition Infinite Loop After Lazy Loading

    Fix React 18 useTransition Infinite Loop After Lazy Loading

    descricao: “Learn how to diagnose and fix the ‘Maximum update depth exceeded’ error when using React 18 useTransition with React.lazy loaded components.” I hit this bug in production last month while rolling out a new code‑splitting strategy for a high‑traffic dashboard. I was swapping a useTransition‑wrapped state update with a React.lazy‑loaded detail view, and suddenly…

    Read more

  • Fix SvelteKit navigation error after lazy‑loaded store

    Fix SvelteKit navigation error after lazy‑loaded store

    descricao: “Learn how to fix the “Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘push’)” error caused by a dynamically imported store in SvelteKit.” I ran into a weird crash in a production SvelteKit app that was using lazy‑loaded stores for feature flags. The moment a component tried to navigate with $app/navigation –…

    Read more

  • Why does AWS WAF block legitimate POST requests with “403 Forbidden” after adding a size constraint on the body for JSON payloads?

    Why does AWS WAF block legitimate POST requests with “403 Forbidden” after adding a size constraint on the body for JSON payloads?

    descricao: “Learn why AWS WAF returns 403 on valid JSON POSTs after adding a size constraint, and how to fix false positives.” I was knee‑deep in a production rollout for a new API endpoint when our monitoring started screaming 403 Forbidden on perfectly valid POSTs. The only change we’d made a few minutes earlier was…

    Read more

  • GitLab CI job hangs at “Running after_script” when Docker‑in‑Docker uses overlay2 on GitLab Runner 15.9

    GitLab CI job hangs at “Running after_script” when Docker‑in‑Docker uses overlay2 on GitLab Runner 15.9

    descricao: “Learn how to fix GitLab CI jobs hanging at “Running after_script” when using Docker‑in‑Docker with overlay2 on Runner 15.9. Step‑by‑step guide and FAQs.” I was in the middle of a release sprint when our CI pipeline started stalling at the very end of a job – the Running after_script line never completed. The job…

    Read more

  • GitHub Actions runner hangs with Docker BuildKit on macOS Ventura

    GitHub Actions runner hangs with Docker BuildKit on macOS Ventura

    descricao: “Learn why GitHub Actions runners freeze on macOS Ventura 13.4 when Docker BuildKit is enabled and how to fix the deadlock.” I hit this exact scenario last month while trying to speed up container builds in a private repo. My workflow was simple: spin up a macos-13 runner, install Docker Desktop (the default version…

    Read more

  • Untitled post 628

    titulo_seo: “GitHub Actions runner hangs with Docker BuildKit on macOS Ventura”meta_descricao: “Learn why GitHub Actions runners freeze on macOS Ventura 13.4 when Docker BuildKit is enabled and how to fix the deadlock.”palavra_chave_foco: “GitHub Actions runner hangs when using Docker BuildKit on macOS Ventura 13.4”slug: “github-actions-runner-hangs-docker-buildkit-macos-ventura-13-4” tags: [“github-actions”, “docker”, “buildkit”, “macos”, “ci”] GitHub Actions runner hangs…

    Read more

  • Helm upgrade fails with “cannot re-use a name that is still in use” on AKS 1.29

    Helm upgrade fails with “cannot re-use a name that is still in use” on AKS 1.29

    descricao: “Learn why Helm 3.14 on AKS 1.29 throws “cannot re-use a name that is still in use” and how to fix release name collisions caused by stricter CRD handling.” I hit this exact error last month while trying to push a minor chart bump through our CI pipeline on an Azure Kubernetes Service (AKS)…

    Read more

  • Stop “ResizeObserver loop limit exceeded” in SvelteKit 2.0

    Stop “ResizeObserver loop limit exceeded” in SvelteKit 2.0

    descricao: “Learn the exact fix for the ResizeObserver loop limit exceeded error caused by Vite’s experimental prebundle in SvelteKit 2.0 projects.” I ran into a nasty ResizeObserver loop limit exceeded error the moment I turned on Vite’s experimental prebundle flag in a brand‑new SvelteKit 2.0 app. The console exploded, the UI flickered, and my dev server…

    Read more

  • How to configure GitHub Actions to cache npm dependencies for Node.js 20 on self‑hosted Windows runners

    How to configure GitHub Actions to cache npm dependencies for Node.js 20 on self‑hosted Windows runners

    Learn how to set up reliable npm caching in GitHub Actions on self‑hosted Windows runners using Node.js 20. Step‑by‑step guide with code. I was in the middle of a release sprint when our CI started taking 15‑20 minutes just to install npm packages on a self‑hosted Windows runner. The pipeline used Node.js 20, the runner was…

    Read more

  • How to fix “permission denied” when a Kubernetes initContainer tries to chmod /var/run/secrets/kubernetes.io/serviceaccount on EKS pods with runAsUser 1000

    How to fix “permission denied” when a Kubernetes initContainer tries to chmod /var/run/secrets/kubernetes.io/serviceaccount on EKS pods with runAsUser 1000

    Learn how to resolve permission denied errors when an initContainer on EKS tries to chmod the serviceaccount token file while using runAsUser 1000. I was debugging a flaky CI/CD job that spun up an EKS pod, ran an initContainer that needed to tweak the service‑account token file permissions, and then crashed with a classic permission…

    Read more

  • Why does Django 5.0 raise ‘RuntimeError: coroutine not awaited’ when using async ORM inside a Celery task

    Why does Django 5.0 raise ‘RuntimeError: coroutine not awaited’ when using async ORM inside a Celery task

    Learn why Django 5.0 throws RuntimeError: coroutine not awaited when using async ORM inside a Celery task and how to fix it. I hit this exact error in production last month: a Celery worker tried to save a model with Django 5.0’s new async ORM and exploded with The stack trace pointed at my save() call…

    Read more

  • What causes “Permission denied (publickey)” for GitHub Actions when using deploy keys generated with ssh-keygen -t ed25519 -a 100?

    Diagnose and fix “Permission denied (publickey)” errors in GitHub Actions when using high‑iteration ed25519 deploy keys generated with ssh-keygen -t ed25519 -a 100 I ran into a maddening “Permission denied (publickey)” error in a CI workflow that was supposed to push a built artifact back to a private repo. The only thing that looked different…

    Read more

  • Failed to verify JWT signature: key ID not found – Auth0 RSA256 daily rotation

    Failed to verify JWT signature: key ID not found – Auth0 RSA256 daily rotation

    Learn why Auth0 throws “Failed to verify JWT signature: key ID not found” after daily RSA256 key rotation and how to fix it. I was knee‑deep in a production rollout when the logs started screaming “Failed to verify JWT signature: key ID not found”. The only thing that had changed was that our Auth0 tenant…

    Read more

  • Hardening Node.js Applications Against Dependency Vulnerabilities Using Snyk and npm Audit

    Hardening Node.js Applications Against Dependency Vulnerabilities Using Snyk and npm Audit

    Learn to secure your Node.js applications from dependency vulnerabilities using Snyk and npm audit for better security As a Node.js developer, I’ve encountered my fair share of security issues, particularly when it comes to dependency vulnerabilities. It’s a problem that can sneak up on you, even with the most rigorous testing and code reviews. In…

    Read more

  • Django 4.1 Redis 7 Connection Fix

    Django 4.1 Redis 7 Connection Fix

    Solving ‘Cannot Connect to Redis Server’ error in Django 4.1 with Redis 7, step-by-step guide to resolving Redis connection issues I’ve recently encountered the dreaded ‘Cannot Connect to Redis Server’ error while working on a Django 4.1 project that utilizes Redis 7 as its cache backend. This issue can be frustrating, especially when you’re on…

    Read more

  • Securing GraphQL API with Apollo Server and JWT

    Learn how to secure a GraphQL API with Apollo Server 3.6.2 and JSON Web Tokens (JWT) in a Node.js 18.12.1 application # Securing a GraphQL API with Apollo Server 3.6.2 and authentication using JSON Web Tokens (JWT) in a Node.js 18.12.1 Application I recently had to secure a GraphQL API with Apollo Server and authentication…

    Read more

  • React Accessibility for Visually Impaired

    React Accessibility for Visually Impaired

    Learn how to implement accessibility features in a React 18.2.0 application for visually impaired users using ARIA attributes # Implementing Accessibility Features for Visually Impaired Users in a React 18.2.0 Application Using ARIA Attributes As a frontend developer, I’ve worked on several projects where accessibility was an afterthought. However, I recently had the opportunity to…

    Read more

  • Troubleshooting Vue.js Rendering Issues

    Troubleshooting Vue.js Rendering Issues

    Diagnose and resolve Vue.js rendering issues caused by third-party library conflicts with practical steps and code examples # Troubleshooting Vue.js Rendering Issues Caused by Third-Party Library Conflicts I’ve been working with Vue.js for a while now, and one of the most frustrating issues I’ve encountered is when my application’s rendering gets messed up due to…

    Read more

  • GDPR Compliance in Node.js

    GDPR Compliance in Node.js

    Learn how to ensure GDPR compliance in Node.js applications using privacy-enhancing technologies # Complying with GDPR Regulations in Node.js Applications Using Privacy-Enhancing Technologies As a senior software engineer, I’ve recently found myself dealing with the complex task of ensuring GDPR compliance in our company’s Node.js applications. The General Data Protection Regulation (GDPR) is a comprehensive…

    Read more

  • Slow API Response Times in Express.js? Here’s My Fix

    Slow API Response Times in Express.js? Here’s My Fix

    Description: Struggling with slow API response times in Express.js? I share the exact diagnostic process and fixes that worked for me in production — from queries to caching Why Your Express.js API Is Slow (And the Exact Steps I Took to Fix It) The first time I got paged for a slow endpoint in production,…

    Read more

  • Next.js Env Variables Not Loading? Here’s the Fix (2025)

    Next.js Env Variables Not Loading? Here’s the Fix (2025)

    Meta Description: Environment variables not loading in Next.js? I break down every common cause — from NEXT_PUBLIC_ prefixes to restart issues — with real fixes that worked for me. Why Your Environment Variables Aren’t Loading in Next.js (And How I Fixed It Every Time) The first time this happened to me, I spent almost an…

    Read more

  • Optimizing MongoDB Query Performance in Node.js

    Optimizing MongoDB Query Performance in Node.js

    Improve MongoDB query speed in Node.js applications using indexing and caching strategies for better performance # Optimizing MongoDB Query Performance in Node.js 14 using Indexing and Caching I’ve recently worked on a Node.js project that relied heavily on MongoDB for data storage. As the dataset grew, we started noticing significant slowdowns in query performance. After…

    Read more

  • Protecting Vue.js against XSS

    Protecting Vue.js against XSS

    Learn how to prevent cross-site scripting attacks in Vue.js 2.6 using DOMPurify to sanitize user input # Protecting against cross-site scripting attacks in Vue.js 2.6 using DOMPurify I’ve worked on several Vue.js projects where security was a top priority. One of the common issues we faced was protecting against cross-site scripting (XSS) attacks. In this…

    Read more

  • Migrating Legacy Monoliths to AWS Serverless Architecture: What I Learned the Hard Way

    Migrating Legacy Monoliths to AWS Serverless Architecture: What I Learned the Hard Way

    Meta Description: I’ve migrated three legacy monoliths to AWS serverless. Here’s my real step-by-step process, the mistakes I made, and what I’d do differently. The first time I was handed a “simple serverless migration,” it was anything but simple. The application was a 12-year-old Java monolith running on EC2, with a single relational database, cron…

    Read more

  • Optimizing Docker Image Size for Python Microservices: How I Went From 1.2GB to Under 90MB

    Meta Description: I cut my Python microservice images from 1.2GB to under 90MB. Here’s my exact process for optimizing Docker image size without breaking builds. The first time I shipped a Python microservice to production, I didn’t think twice about image size. I wrote a simple Dockerfile, pulled the default python:3.11 base image, installed my…

    Read more

  • Fixing Docker Permission Denied Errors on Ubuntu (The Complete Guide)

    Fixing Docker Permission Denied Errors on Ubuntu (The Complete Guide)

    Meta Description: I hit the Docker permission denied error more times than I’d like to admit. Here’s every fix I’ve used on Ubuntu, from quick patches to root causes. The first time I saw permission denied while trying to connect to the Docker daemon socket, I did what most people do — I just typed…

    Read more

  • How to Avoid Rate Limits in Node.js Apps (Without Breaking Your Users)

    How to Avoid Rate Limits in Node.js Apps (Without Breaking Your Users)

    Meta Description: Learn how I stopped hitting rate limits in production Node.js apps using throttling, queuing, caching, and smart retry strategies that actually work. I still remember the first time a production Node.js service I built got completely throttled by a third-party API in the middle of a traffic spike. Every outgoing request started returning…

    Read more

  • Why Your CSS Grid Breaks Only on iPhone: Fixing Layout Overlap in Mobile Safari

    Why Your CSS Grid Breaks Only on iPhone: Fixing Layout Overlap in Mobile Safari

    Meta Description: Debug CSS Grid layout overlap bugs in mobile Safari with real fixes for implicit rows, minmax, flex-basis conflicts, and viewport units. Introduction The first time I saw it, I genuinely thought I was losing my mind. A three-column CSS Grid layout that looked flawless in Chrome DevTools’ device emulator, tested clean in Firefox…

    Read more