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


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…

Continue reading →

An opinionated HTML Serializer for PHP 8.4


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…

Continue reading →

Pretty Print HTML using PHP 8.4's new HTML DOM


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…

Continue reading →

Create a Table of Contents based on HTML Heading Elements


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…

Continue reading →

ManyTag Colour eInk Badge SDK - Minimum Viable Example for Android


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…

Continue reading →

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


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. …

Continue reading →

Add a custom icon to Auth0's Custom Social integrations


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,…

Continue reading →

Change WordPress Fragment Links in RSS Feeds to be Permalinks


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…

Continue reading →

An Easy Guide To BlueSky Verification


Change Handle screen.

The new Twitter-Wannabe BlueSky has an interesting approach to verifying accounts. Rather than you sending in your passport, or paying a 3rd party, or bribing an employee - you can self-verify for free! This opens up verification to small organisations, individuals, and anyone who wants to prove who they are. Brilliant! Verification means that your @username will change to @Your.Website.com -…

Continue reading →

A simple and free way to post RSS feeds to Threads


Threads logo.

Threads is Meta's attempt to disrupt the social media landscape. Whether you care for it or not, there are a lot of users there. And, sometimes, you have to go where the audience is. Here's how I build a really simple PHP tool to post to Threads using their official API. This allows you to send a single status update programatically, or regularly send new items from your RSS feed to an account. …

Continue reading →

Using phpList for a blog's newsletter


RSS Settings Screen.

Some people like to receive this blog via email. I previously used JetPack to send out subscriber messages - but it became increasingly clear that Automattic isn't a good steward of such things. I couldn't find any services which would let me send a few thousand subscribers a few emails per week, at zero cost. So, redecentralise! I installed phpList which is an open source email campaign tool. …

Continue reading →

HDR on a Pioneer VSX-933


Screenshot showing how to change the HDR setting on a VSX-933.

I bloody hate hardware manufacturers. I wanted to use HDR on my PlayStation 5. The console supports it, my TV supports it, my amp supports it, my cables support it. Yet it wasn't working. I tried everything - updating firmware, replacing cables, and even reading the manual. Nothing. And then I stumbled on the answer thanks to a random forum post. Perform the following procedure when the unit…

Continue reading →
OSZAR »