How To: Count All Rows in a Range in Google Sheets
A simple one on the surface of it, but I couldn’t find a quick answer. Hopefully this saves you some time Let’s say you have a Google Sheet where you have a bunch of rows, and you want to count the total number of rows in a range dynamically. In other words, when you add … Read more
NextJS 14 CRUD Forms Example
I recently had to do a proof of concept site using NextJS 14. I hadn’t used NextJS since version 11, and who knew how much could change in 3 major versions? The big change is the use of Server Actions, and then the App Router / /app directory, as opposed to the older client server … Read more
How To Add A Custom Social Icon In WordPress
Right then, ready for something that seems like it ought to be super easy, but is infact a complete pain in the backside? Good, because in today’s post we are going to add a custom social icon in to display in the standard WordPress social icons block. No plugins needed! That’s a bonus. But you … Read more
Multi-Stage Docker Build Arg Example
Today I needed access to an environment variable whilst building a Docker image from a Dockerfile. To make the example concrete, I wanted to get access to the Git commit hash exposed in a CircleCI build. The idea was to then use this commit hash inside my build as a cache buster on client side … Read more
Post Redirect Get Pattern Example
In this post we are going to cover the Post Redirect Get pattern using NodeJS, Express, TypeScript, and for rendering things, Nunjucks and the Gov UK front end. This pattern is generic to any MVC implementation, and the concepts are very easily adapted. The Post Redirect Get pattern is for handling form submissions in web … Read more
How To Hide Console Logs In Jest
There’s something super irritating to me about seeing a Jest test suite run and a bunch of noisy console logs get dumped out, mucking up the results. Here’s an example: At a glance, I find it’s pretty hard to know which of those tests is problematic. Even with the coloured console output, the big expected … Read more
Advent of Code 2023: Day 1 Part 2 – Fixes Required
This post follows on from Advent of Code 2023: Day 1 Part 1 – Calibrating Snow Operations where we were busy solving the Advent of Code 2023 Day 1 exercises using Kotlin and TDD. Part 1 is solved, but as soon as you provide the answer, Part 2 becomes available. Mean. The problem is similar, … Read more