I’m probably doing Cloudflare a disservice by categorising it as a CDN provider, but that’s certainly one of the many services they offer and perhaps how most individuals using their free offering see them. Like me, I’m certain the vast majority of that group use the Cloudflare dashboard to configure their domains, but Cloudflare provides an API that allows you to programmatically manage those DNS records through a command-line interface of a Unix shell such as Bash.(more…)
I had a situation where I needed to pass code to Python in the form of a single command instead of a script file. While this is easily done by invoking Python in command mode, the code contained a conditional statement that caused Python to throw an error.(more…)
Before selling my late 2015 27″ iMac Retina 5K I wanted to secure erase its 1TB Fusion Drive consisting of a 24GB SSD and 1TB HDD. Secure erasing an HDD is simple enough using the Security Options in
Disk Utility, but for Fusion Drives and SSDs this option is not available. To secure erase the iMac’s HDD I first needed to break the Fusion Drive into its constituent parts using
I’ve just started learning how to subnet and while there are plenty of resources to help with the calculations and understand the maths I tend to grasp things better if I have some visual representation.
To help, I put together the following table which – I hope – nicely illustrates the patterns of binary 0s and 1s in the 4th octet of a class C IP address and their correlation to the patterns of block sizes, network IDs, host IDs and broadcast addresses of the various subnets. The table is not intended to explain how to calculate subnets nor even to act as a cheat-sheet, but others may find the visual representation helpful.(more…)
The desktop version of Cisco Packet Tracer (CPT) is currently available in three flavours: 32-bit and 64-bit versions for Windows 7, 8.1 and 10 and a 64-bit version for Linux. There is no macOS version so I decided to install the 64-bit Linux version of CPT (7.1.0.0222)1 on Ubuntu 16.04.3 LTS running on VMware Fusion (10.1.1).(more…)
Comments in WordPress are displayed using the wp_list_comments() function. This function takes many arguments. One of these is callback which takes the name of a defined function that in turn determines what and how comment data is output. If no callback function is given, wp_list_comments() uses a built-in default function.(more…)
Part of a project I’m working on requires re-setting a MySQL table by deleting most – but not all – rows. In PHP I’m using mysqli::prepare to prepare the MySQL statements.
$id = 5; $query = $conn->prepare("DELETE FROM table WHERE id>?");
The MySQL statement includes a parameter marker – denoted by ? – which is then substituted for the value of the $id variable using mysqli::bind_param.(more…)
Several Desktop blog-editing applications use XML-RPC to allow you to manage your WordPress blog. The one I use is MarsEdit.
XML-RPC functionality has been turned on by default since WordPress 3.5 so after updating to WordPress 3.8.2 I was not expecting MarsEdit to report that XML-RPC services are disabled on this site.(more…)
Having spent some considerable time and effort cleaning this site after it had been hacked I was determined to make it as secure as I possibly could in an attempt to prevent it happening again.
This is a WordPress site running on an Apache server so one of the numerous measures I implemented was to use HTTP Authentication to password-protect the
Those of you familiar with MAMP will no doubt know that MAMP’s MySQL root user password is set to root by default and changing it is not as straightforward as it perhaps should be.
I’ve previously described a way of successfully changing the root user password providing, of course, that you know the current password. If you’ve forgotten it, this method will not work and a way of re-setting the password is required.(more…)