Terence Eden. He has a beard and is smiling.

Terence Eden’s Blog

Theme Switcher:

A big list of things I disable in WordPress

· 12 comments · 900 words · Viewed ~3,973 times


The Logo for WordPress.

There are many things I like about the WordPress blogging software, and many things I find irritating. The most annoying aspect is that WordPress insists that its way is the best and there shall be no deviance. That means a lot of forced cruft being injected into my site. Headers that bloat my page size, Gutenberg stuff I've no use for, and ridiculous editorial decisions. To double-down on the…

A Self-Hosted Favicon Proxy written in PHP

· 3 comments · 600 words · Viewed ~476 times


The PHP logo.

In theory, you should be able to get the base favicon of any domain by calling /favicon.ico - but the reality is somewhat more complex than that. Plenty of sites use a wide variety of semi-standardised images which are usually only discoverable from the site's HTML. There are several services which allow you to get favicons based on a domain. But they all have their problems. Google Exposes…

Quick Swap Data SIM Shortcut on Android

· 1 comment · 200 words · Viewed ~1,039 times


List of settings activities.

I have a dual SIM Android phone. When I call or text, I get a choice of which SIM to use. But there's no quick way to swap which SIM is used for data. There used to be a built-in settings tile on stock Android, and some manufacturers still have it, but Google's Pixels don't. So here's how to make a (fairly) quick shortcut to swap between data SIMs. First, get the brilliant open source Activity …

Convert Shotwell Photo Metadata to Digikam Metadata

· 100 words · Viewed ~217 times


Linux bash terminal icon.

Mostly notes to myself. Shotwell stores most of its information in a database. Which I lost. Because I'm an idiot. But a bunch of metadata is also stored in the image's EXIF metadata! Most importantly is the "Original File Name" which should become the "Description" in DigiKam. Unfortunately, there's no way to copy those values automatically on import. So here's a one-liner which will read…

You don't need an API key to archive Twitter Data

· 3 comments · 1,700 words · Viewed ~2,952 times


The Twitter logo.

Apparently there's no need for IP laws any more, so here's a way to archive high-fidelity Twitter data without signing up for an expensive API key. This is perfect for academics wishing to preserve Tweets, journalists wanting to download evidence, or simply embedding content without leaking user data back to Twitter. Table of Contentstl;drBackgroundEmbed CodeAPI CallOptionsOutputTweet With…

An opinionated HTML Serializer for PHP 8.4

· 800 words · Viewed ~984 times


The HTML5 Logo.

A few days ago, I wrote a shitty pretty-printer for PHP 8.4's new Dom\HTMLDocument class. I've since re-written it to be faster and more stylistically correct. It turns this: <html lang="en-GB"><head><title id="something">Test</title></head><body><h1 class="top upper">Testing</h1><main><p>Some <em>HTML</em> and an <img src="example.png" alt="Alternate Text"></p>Text not in an…

Pretty Print HTML using PHP 8.4's new HTML DOM

· 1 comment · 950 words · Viewed ~770 times


The PHP logo.

Those whom the gods would send mad, they first teach recursion. PHP 8.4 introduces a new Dom\HTMLDocument class it is a modern HTML5 replacement for the ageing XHTML based DOMDocument. You can read more about how it works - the short version is that it reads and correctly sanitises HTML and turns it into a nested object. Hurrah! The one thing it doesn't do is pretty-printing. When you call…

Create a Table of Contents based on HTML Heading Elements

· 1 comment · 1,200 words · Viewed ~439 times


The PHP logo.

Some of my blog posts are long. They have lots of HTML headings like <h2> and <h3>. Say, wouldn't it be super-awesome to have something magically generate a Table of Contents? I've built a utility which runs server-side using PHP. Give it some HTML and it will construct a Table of Contents. Let's dive in! Table of ContentsBackgroundHeading ExampleWhat is the purpose of a table of…

ManyTag Colour eInk Badge SDK - Minimum Viable Example for Android

· 500 words · Viewed ~427 times


Screenshot of an app.

Last year, I reviewed a Four-Colour eInk Name Badge - the ManyTag HSN371. The hardware itself is perfectly fine, but the Android app isn't great. It is complicated, crash-prone, and not available in the app-store. After some back-and-forth with the manufacturer, they agreed to send me their Android SDK and documentation. Sadly, the PDF they sent me was riddled with errors and the software…

Change the way dates are presented in WordPress's admin view

· 1 comment · 200 words · Viewed ~251 times


The Logo for WordPress.

WordPress does not respect an admin's preferred date format. Here's how the admin list of posts looks to me: I don't want it to look like that. I want it in RFC3339 format. I know what you're thinking, just change the default date display - but that only seems to work in some areas of WordPress. It doesn't change the column-date format. Here's what mine is set to: So that doesn't work. …

Add a custom icon to Auth0's Custom Social integrations

· 350 words


Screenshot showing an ID field.

This is so fucking stupid. There is no way to update the logo of a custom social connection on Auth0 without using the command line. On literally every other service I've used, there's a little box to upload a logo. But Okta have a funny idea of what developers want. And, to make matters worse, their documentation contains an error! They don't listen to community requests or take bug reports,…

Change WordPress Fragment Links in RSS Feeds to be Permalinks

· 1 comment · 50 words · Viewed ~254 times


A glowing red mushroom cloud caused by an atomic bomb.

Here's a knotty problem. Lots of my posts use URl Fragments. Those are links which start with #. They allow me to write: <a href="#where-is-this-a-problem>Jump to heading</a> So when someone clicks on a link, they go straight to the relevant section. For example, they might want to skip straight to how to fix it. Isn't that clever? Where is this a problem? This works great when someone is…