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, so I'm blogging in the hope that this is useful to you. The Command curl --request PATCH \ -H…

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 on my website. They're on the page, and a fragment links straight to the correct section of that…

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 - this means that everyone can see your BlueSky account is owned by that specific website. When you…

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. You can see the bot in action at https://www.threads.net/@openbenches_org Get the code The code…

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. My webhost - Krystal - had a one-click install option. But, phpList isn't quite one-click for…

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 is on. 1. While pressing DIMMER on the main unit, press AUTO/DIRECT to display the current…

Continue reading →

link rel="alternate" type="text/plain"


The Logo for WordPress.

Hot on the heels of yesterday's post, I've now made all of this blog available in text-only mode. Simply append .txt to the URl of any page and you'll get back the contents in plain UTF-8 text. No formatting, no images (although you can see the alt text), no nothing! Front page https://shkspr.mobi/blog/.txt This blog post https://shkspr.mobi/blog/2024/05/link-relalternate-typetext-plain/.txt A tag https://shkspr.mobi/blog/tag/solar.txt This was slightly tricky to get right! While there…

Continue reading →

Server-Side Rendering of Embedded Markdown Code Snippets in WordPress


The Logo for WordPress.

Because I'm a grumpy old man, I don't use Gutenberg or Block themes on my WordPress. Instead, I write everything in Markdown. When I write code snippets in Markdown, they look like this: ```php $a = 1; echo $a; if ($a < 5) { // Do Something return thing( $a, true ); } ``` But I want to render that with code highlighting. I was using the Prismatic Plugin. It is excellent and very customisable. But it uses JavaScript to do the code highlighting. I want to respect my readers' time and …

Continue reading →

HOWTO: Sort BitWarden Passwords by Date


Screenshot of the BitWarden export page.

I highly recommend BitWarden as a password manager. It is free, open source, and has a great range of apps and APIs. The one thing it doesn't have is a way to sort your accounts by creation date. I now have over a thousand accounts that I've added - so I wanted to prune away some of the older ones. So, here's how to do it. Export your vault In the desktop version of BitWarden, go to File → Export Vault. Choose the JSON format (this doesn't work for CSV) and follow the on-screen i…

Continue reading →

eInk Display for Octopus's Agile Energy Tariff


An eInk screen with a line graph on it. The graph shows the current price of power. The eInk is mounted in a wooden frame.

I'm a little bit obsessed with building eInk displays. They're pretty cheap second hand. They're low energy, passive displays, with good-enough performance for occasional updates. Here's a new one which shows me what the current cost of my electricity is: Background After installing solar panels, a smart electricity meter, and a solar battery - the next obvious step was a smart energy tariff. Octopus (join and we both get £50) have an "Agile" tariff. Unlike a normal tariff - with a set …

Continue reading →

Publish Confirmation For WordPress Classic (2023)


Screenshot of a page asking for confirmation before publishing.

Here's a quick scrap of code that works. There are lots of outdated tutorials out there for old versions of WordPress. This one is tested to be working in WordPress 6.3.2. This will pop up a confirmation dialogue when you try to publish, update, or schedule a post or page. The Code Add this to your theme's functions.php file: add_action( "admin_footer", "confirm_publish" ); function confirm_publish() { echo <<< EOT <script> var publishButton =…

Continue reading →

Find WordPress featured images with no alt text


The Logo for WordPress.

WordPress allows you to set a featured image - called a "thumbnail" in the API. This gives a single image which can be used on a listing page, or shown when a post is shared on social media. The WordPress Media Library lets you set the alt text of an image. But, crucially, this alt text can be different when the image is used as a featured image. Here's how to find all your featured images which don't have alt text. One Liner Paste this into wp shell to get a list. foreach (get_posts(…

Continue reading →