Blog Posts by Andrew B. Collier / @datawookie


Read by Frank Collier

Read by Frank Collier

A collection of books read by my father, Frank Collier, for Tape Aids for the Blind. Dad was always an enthusiastic and patient reader. One of my earliest memories is of him reading to my sister and me in bed each morning. In retirement he devoted many hours to reading and editing books for Tape Aids for the Blind.

Read More →

What is Traefik?

Traffic in a LEGO landscape.

I’ve come across Traefik in a number of questions on Stack Overflow recently. I regularly use NGINX as a reverse proxy and sometimes find it to be a little obscure. Having an alternative would be helpful.

Read More →

Testing CSS & Xpath

A colourful image of people working in an impressionist style.

There are many tools for generating CSS selectors and XPath expressions. However, short of using them in your code, how can you quick test them? In this post I’ll show how you can use your browser’s Developer Tools to establish that your CSS or XPath is doing what you intend.

Read More →

Parsing the DOM

A mobster in Art Deco style.

The parse() function from the html-react-parser package converts HTML strings into React elements. It allows you to take HTML and render it as if it were JSX. This can be particularly useful when you’re working with content that comes as HTML from external sources (such as a CMS) and you want to include that content in your React components. It can also be used to filter and modify the React elements.

Read More →

Dynamic User Pages

Month of Gatsby
People socialising in an art deco style.

Suppose you want to redirect paths beginning with @ to a specific user page. For example, the @datawookie path would take you to the user page for handle datawookie.

There are probably a few ways to do this, but one approach would be to use dynamic routing.

🚀 TL;DR Show me the code. Look at the 27-dynamic-users branch. This site is deployed here.

First let’s set up the user page at src/pages/user.jsx.

Read More →

Python Security Audit

A Roman centurion guarding a cage of snakes.

Is my code secure? This is something that we should all be thinking (if not worrying) about. A thorough security audit would be the ideal, but what if you don’t have the skills or resources for that? Well, there are some tools that will at least get you part way there.

Read More →

Gatsby, Tailwind & Docker

A whale in art deco style.

Gatsby and Tailwind are a formidable combination for putting together a robust and attractive site. Throw Docker into the mix and you also have robust and reliable deployments. Here’s how to set that up for a minimal site.

Read More →

.NET and MySQL in Docker

In the interests of full disclosure, I know very little (very little indeed!) about .NET. But I do enjoy figuring things out. In this post I’ve documented what I learned when trying to connect a simple .NET application to MySQL using Docker Compose.

We’re going to try to do this using Docker as far as possible, which will allow me to avoid having to set up .NET on my local machine.

Read More →

WordPress Headless CMS

Month of Gatsby
An art deco style image of a garden party with an imposing house in the background.

Not everybody is comfortable crafting web pages directly in JavaScript, HTML or even Markdown. Often content writers are more productive in an environment like WordPress. What if you want to develop your site using Gatsby but allow content writers to still craft their content in WordPress? No problem! You can use WordPress simply as a Content Management System (CMS), then pull the content through into your Gatsby site.

In this post we’ll look at how to set up a Headless WordPress CMS as a source of content for Gatsby.

Read More →

Minecraft Paper Server

A Minecraft character wearing glasses. The landscape and clothing of the character are patterned with newspaper.

The original Java Edition of the Minecraft Server that we installed previously implements all of the basic server functionality required for multiplayer Minecraft. But perhaps this is not enough. What if you want to customise the server by installing plugins? In that case you need to install a more sophisticated server forked off the original. The PaperMC Minecraft Server provides a lot of bells and whistles not present in the original.

Read More →