I can now query my solar panels via my Alexa Amazon Dot Echo thingie (why so many names?). https://shkspr.mobi/blog/wp-content/uploads/2017/05/VID_20170501_161804.webm I flatter myself as a reasonably competent techie and programmer, but fuck me AWS Lambdas and Alexa skills are a right pile of shite! Sorry if that sounds a bit harsh, but they're a pain in the arse to get anything done. I…
Continue reading →
Here's a simple bash one-liner to convert mixed-case filenames into Title Case: rename 's/(\S+)/\u\L$1/g' * This forces the file extension to lower-case as well. Use rename -n to test the command without changing anything on the filesystem. (Adapted from this PerlMonks FAQ.) Background I have a bunch of inconsistently named files like: HERE COMES THE SUN.mp3 hey jude.mp3 The lOng and…
Continue reading →
Scratching my own itch. I have a bunch of directories which I want moved into alphabetic sub-directories. This is handy is you have a bunch of MP3s, books, or other catalogued files. This bash script moves a top level directory (and all the files and subdirectories under it), to a folder based on the (upper-case) version of the first character of the directory name. #!/bin/bash for dir in */…
Continue reading →
As ever, notes to myself. I hope you appreciate this future me! Photographs often contain EXIF metadata - really useful for finding out when a photo was taken. It turns out that you can add similar metadata to MP4 format videos. Here's how to do it with ffmpeg on Ubuntu Linux. The magic option is -metadata creation_time="2015-12-25T12:34:56" Stick that in when you're encoding your video and it …
Continue reading →
I've grown to loath IFTTT. What started out as a cool way to plug internet things together has being an opaque an uncommunicative company with no real interest in customer service. That's not surprising, I suppose, its paying customers are the companies who can't be bothered to develop a proper API and so just shove some integrations up there. But it is annoying for those of us who want…
Continue reading →
As ever, mostly notes to myself. RAR is a silly and proprietary format. I prefer free software and I find that ZIP files are smaller and decompress faster. Not everyone agrees, and that's fine. Assuming you've downloaded a RAR file and want to convert it to ZIP, what's the easiest way? Install P7Zip sudo apt-get install p7zip-full p7zip-rar Script This basic bash script will Extract a…
Continue reading →
Mostly notes to myself :-) Here is a quick way to add watermarks to photos and videos. All Linux command line based - so perfect if you've got a lot of images you want to manipulate. Here is a delightful photo I've taken of a bee covered in pollen. I want to add a little copyright notice to it in order to discourage people using it without permission. This command uses imagemagick's…
Continue reading →
Notes to myself! Suppose you want to create a surround sound file using Audacity. The app is a little obtuse, so this may clear up some confusion. When exporting, Audacity defaults to mixing down to stereo. You must adjust these settings: Edit → Preferences → Import/Export → Use Custom Mix Lay out your audio. Keep each track as mono. You can have as many tracks as you like and then downm…
Continue reading →
Earlier this year I was moaning about my Nexus 6. Motorola's crappy battery technology is well documented, my phone was running so hot that the glue holding the device together became unstuck! Eventually, the battery failed. It would report being fully charged, but only run for a few minutes before switching off. Recalibrating and resetting the battery statistics failed to improve the…
Continue reading →
This is a quick review of the ZeleSouris Vertical Mouse and a guide to setting it up on Linux. Four years ago, I got the latest Evoluent Vertical Mouse. It's a great device, but it's starting to show its age a bit. So, time for a new model. I'm doing a lot of travelling, so a wireless mouse is a must. Sadly, the Evoluent Wireless Mouse is £75. As good as their mice are, I wanted something …
Continue reading →
So, I've submitted my first patch to the Linux Kernel! It's trivial set of documentation improvements - mostly done so I could see if I've got everything set up correctly. This blog post is more of an aide memoire than a fool proof guide - I hope future me finds it useful! Install and Configure git I'll leave you to figure out how to install git on your system - one thing you will need to is…
Continue reading →
(These notes are mostly for my own benefit). Android is moving away from USB Mass Storage. You will no longer be able to plug in a USB cable and have your Android show up as a USB disk. There are some good technical reasons for this, but it is a pain if you want to copy some files to your phone. The new system - MTP - isn't automagically detected in Ubuntu. This is something which is likely…
Continue reading →