Terence Eden. He has a beard and is smiling.

Terence Eden’s Blog

Theme Switcher:

How to centre an icon inside a square and a circle?

· 2 comments · 200 words · Viewed ~363 times


airbnb logo centred on the circle-fs8

A little mathematical / spatial / design problem I've been having. I have an icon which, depending on the user's preference, can be inside a square or a circle. Is it possible for it to be centred in both? Here's a visual example. On the left is the AirBnB logo centred in a square. When the background is turned into a circle, the logo appears to "drop" - the bottom of the logo is closer to the …

Adjusting timestamps on images with Python

· 1 comment · 200 words · Viewed ~3,490 times


A cute penguin.

As ever, mostly notes to myself. I have a bunch of old images which don't have any timestamp associated with them. This quick Python script will add a DateTime EXIF metadata tag to an image. This uses piexif which can be installed using pip install piexif This simple script reads a photo, adds a timestamp, then saves a copy of the new photo. from PIL import Image from PIL.ExifTags import…

Solar Battery and Alexa - in 30 lines of code

· 450 words · Viewed ~250 times


A list of phrases used to activate the device

Amazon Alexa is a fun little bit of kit. But it can be tricky getting it to work with all your smart devices. Not every company has an Alexa skill - just like not every company has an app. Using Flask-Ask it is possible to bring Alexa smarts to a range of previously mute devices. Alexa coding works on "intents" - the following is a simple intent. That is, you can only ask the skill one…

Yes, but what does your startup *do*?

· 7 comments · 450 words · Viewed ~26,554 times


A confused little cardboard robot is lost amongst the daisies

I recently signed up for a hackathon. Part of the deal these days is that sponsors get to send promotional messages to the attendees. Fair enough. The only problem is, most of these messages are rubbish! Here's the verbatim message I received - there were no links other than to Twitter. See if you can work out what this startup does... Just a quick heads up to let you know that we'll be…

<input type="country" />

· 35 comments · 850 words · Viewed ~21,921 times


A screenshot of a list of country flags

Recently, Lea Verou asked an important question about whether HTML should have a standardised way of letting users select a country from a list. Lea Verou@LeaVerouHTML Idea: <input type="country"> which would become a searchable dropdown with all countries and their flags.Wouldn't that be awesome?❤️ 1,863💬 113🔁 013:17 - Sat 21 October 2017 You can read through the conversation and make your own …

A grumpy look at using a Yubico Neo NFC on Ubuntu & Android

· 12 comments · 1,400 words · Viewed ~5,428 times


YubiKey Neo - a thumb sized USB device - on cardboard backing

Twenty One. I have 21 accounts which use Two-Factor Authentication. I use the Authy app to manage them all, but it is still a pain to scroll through and find the exact 2FA token I need. Encouraged by my friend Tom Morris's blog post, I picked up a YubiKey NEO for £50. It implements the FIDO U2F standard. Sadly, the YubiKey is substandard and frustrating to use. Here's what I found. First …