A quick (and silly) way to create generative avatars


I was asked to help create some pseudo-NFT style avatars for Cambridge Digital Humanities' Faust Shop project. Something with vaguely the same æsthetic as those daft "Crypto Punks". You can see it in action partway through this TikTok video. @cambridgeuniversity Visit the #Faust Shop and see what happens when you make a deal with your digital double. #Devil #EduTok #Cambridge #Performance #Philosophy ♬ original sound - Cambridge University Here are some examples of the types of av…

Continue reading →

Guide to flashing OpenWRT on a Wavlink Quantum D6 - with screenshots


The normal screen with lots of options.

Notes for anyone who wants a more detailed guide than the one on the official Wiki. Download OpenWRT Download the initramfs firmware file Rename the file to WN531A6.bin Download the sysupgrade file Download the original firmware Check the model number on your router. You can download the firmware from Wavlink directly. They have a specific firmware for WL-WN531A6-A and WL-WN531A6-C. Make sure you download the correct one. You can also back up the original firmware from your router if you …

Continue reading →

Reboot and launch an Android app via ADB


Android logo.

I'm using an old Android phone as a webcam. The camera lens is great, the DroidCam software is nifty, but the Android OS behind it is old and dying. My phone often needs rebooting. Which means that the app also needs restarting. The phone's screen faces away from me, so I can't interact with it. This is a quick guide (mostly notes to myself) about rebooting and starting an app from the command line. To find the package name, run adb shell pm list packages -f | grep -i PackageName In my…

Continue reading →

How to migrate Google For Your Domain to normal Gmail


The Gmail icon.

Google has decided to fuck over its early adopters. Way back in 2006, Google announced Google Apps for Your Domain. Basically it was Gmail - but you could use your own domain. No more example@gmail.com now you could be me@example.com. Hurrah! At the time, they said: organizations that sign up during the beta period will not ever have to pay for users accepted during that period (provided Google continues to offer the service). Google still offers the service - since renamed G-Suite, then…

Continue reading →

Use Python to get alerted when an Amazon wishlist item drops in price


Logo of the Python programming language.

Scratching my own itch. I want an alert when there's been a price drop on an item on my Amazon wishlist. I couldn't find an easy way to get an email directly from Amazon (customer-focused my shiny metal arse) so I knocked something up in Python. This is heavily inspired by Leigh Dodds' Wishlist Monitor. Amazon don't offer an API for wishlists (innovative my shiny metal arse). So this uses Beautiful Soup to grab the data from the HTML. To be fair, there's also some microdata on the page, which …

Continue reading →

Quick Image Montages


85 Book Covers.

(Mostly notes to myself.) If you have a lot of images in a directory, and want to quickly make an image montage, here's how to do it on Linux using ImageMagick. First up, this command finds all JPG file, then resizes them so they fit in a maximum box of 256x256, then sets the quality to 75%, then saves them as JPGs: find ./ -type f -iname "*.jpg" -exec mogrify -verbose -format jpg -layers Dispose -resize 256\>x256\> -quality 75% {} + This will overwrite your existing files so make sure you…

Continue reading →

Notes on using an Android phone as a Webcam on Linux


A settings screen with options to stream over WiFi or USB.

(Written mostly for myself) Install DroidCam I use DroidCam - which converts your Android into a wired or wireless webcam. Set the resolution nano /etc/modprobe.d/droidcam.conf Add the following text: options v4l2loopback_dc width=1280 height=720 Most video call services are limited to 720p, and streaming 1080p and higher via USB isn't always possible. Interact with the Android My Android's screen faces away from me - so I can't easily touch or interact with it. Here are two useful…

Continue reading →

Change how fast your cursor blinks in Firefox


(Mostly written to prevent me forgetting) In about:config add this setting ui.caretBlinkTime of type integer. Then set the number to how many milliseconds between blinks. 250 is very quick, 500 is about normal. I tend to go for about 400. Set it to 0 if you don't want it to blink at all. Click the ✅ button and your caret blink speed will immediately change. You can see more configuration options in the source code. …

Continue reading →

Howto: Stop Firefox Forcing Dark Mode on Websites


Firefox dev tools. A pop up informs you that the colour scheme can be toggled.

Here's how to stop Firefox automatically turning on dark-mode for websites. In the address bar, type in about:config and press ⏎ and accept the warning it gives you. Add a new value ui.systemUsesDarkTheme set it to type number and pick one of the following: 0 to tell websites to always use the light theme. 1 to tell websites to always use the dark theme. 2 to tell websites you have no preference. Dev Tools If you want to do this on a one-off basis, open up the Dev Tools and click on t…

Continue reading →

Check your battery stats with the OnePlus Diagnostic Tool


App showing healthcheck app.

My OnePlus 5T is 3.5 years old and, after daily abuse, its battery life is starting to fade. But how bad is it? OnePlus have a diagnostic tool which, annoyingly, isn't available in the Google Play store. And is a bit of a pain to run. So here's a quick tutorial. Download the app APK Mirror have a copy of OnePlus Diagnostic 2.1. There may be a later version by the time you read this. Download and install it. But how do you run it? I couldn't find it in my app list. Install App Manager From …

Continue reading →

Animated TreeMaps in R - the hard way


A treemap which show a volumetric view of data.

As I am a bear of very little brain, these are notes to myself on my slightly shonky process for creating animated TreeMaps in R. The aim is to end up with something like this: https://shkspr.mobi/blog/wp-content/uploads/2021/06/animated-tree-map.mp4 Generate the images Getting the data is left as an exercise for the reader (sorry!). This loops through the data and generates a separate image for each TreeMap: for(week in weeks) { weekly_data <- subset(file_data, Week == week) size…

Continue reading →

How to fake AVIF thumbnail images


Linux bash terminal icon.

AVIF is the hip new image format. It is born out of video compression technology. Modern video streaming services have a complicated relationship with multiple resolutions. A video is usually encoded several time - for high, medium, and low bandwidths. When you start streaming, your playback device usually picks the lowest quality stream to start with. If it downloads it quickly, then it jumps to the higher resolution. You may have noticed this when the first few seconds of a streaming show…

Continue reading →