Terence Eden. He has a beard and is smiling.

Terence Eden’s Blog

Theme Switcher:

Reprojecting Dual Fisheye Videos to Equirectangular (LG 360)

· 500 words · Viewed ~868 times


Dual fisheye photo of us and some elephants.

I still use my obsolete LG 360 Camera. When copying MP4 videos from its SD card, they come out in "Dual Fisheye" format - which looks like this: VLC and YouTube will only play "Equirectangular" videos in spherical mode. So, how to convert a dual fisheye to equirectangualr? The Simple Way ffmpeg \ -i original.mp4 \ -vf "v360=input=dfisheye:output=equirect:ih_fov=189:iv_fov=189" \ …

Adding "Log In With Mastodon" to Auth0

· 4 comments · 600 words · Viewed ~421 times


Login screen with several social login buttons.

I use Auth0 to provide social logins for the OpenBenches website. I don't want to deal with creating user accounts, managing passwords, or anything like that, so Auth0 is perfect for my needs. There are a wide range of social media logins provided by Auth0 - including the usual suspects like Facebook, Twitter, WordPress, Discord, etc. Sadly, there's no support for Mastodon. All is not lost…

A big list of things I disable in WordPress

· 14 comments · 900 words · Viewed ~4,256 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 ~499 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,315 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 ~226 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 ~3,339 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 ~988 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 ~815 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 ~497 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 ~440 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 ~255 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. …