Promoting MySQL slave to master

Why Many reasons why, one is because the master is running out of space, another would be to safely facilitate an OS upgrade. In the first instance we could resize the droplet, but that’ll take time during which the DB will not be available and therefore result in enforced downtime, in the latter case we […]

Hive lights with Siri

If you have Hive sockets, you can control them using Siri – for this you’ll need to utilise Apple’s ‘Shortcuts‘ App. Once installed open the app and go to the add shortcuts screen by tapping on the ‘+’ in the top right corner. At the bottom you see a ‘search’ input, for each component shown […]

Banishing Loops

PHP has a number of functions for manipulating arrays of data, which will almost always achieve a result quicker than creating a solution in PHP itself, often involving one or more nested loops. Part of the reason for this is that PHP is interpreted whereas the underlying PHP functions are compiled.  Output data as csv […]