Steps to safely remove Linux kernels (Ubuntu)

Note: Please understand, these instructions can make your system non-bootable. If you’re unsure, do not continue. If you’re trying to update the kernel and low/empty disk space errors are shown, it’s probably because the /boot/ directory is full. Use this command to see the available space of /boot/: sudo df -h Now check the kernel […]

Read More

Test your system for Spectre and Meltdown vulnerabilities

Following the outbreak of three processor vulnerabilities, known as Spectre and Meltdown; I have already patched my systems and whilst doing so, came across this useful script written by Speed47. This script checks your system for the three vulnerabilities. I found it useful to check my systems were secure after applying kernel updates. To run […]

Read More

PHP: Finding a multi-dimensional array key’s associated value

I thought I would share this simple PHP function to hopefully help anyone needing a quick solution. Imagine, you have a multi-dimensional array such as this: <?php //Example array $array = array( ‘test’ => array( ‘name’ => ‘John Doe’, ’email’ => ‘john@example.com’ ) ); ?> And you need to extract a specific bit of data, […]

Read More

Version 2.0.0: Backup MySQL (Bash script)

This is similar post to be read together with this. And a follow-up update to ‘Backup SQL files to FTP server‘ script. Version 2.0.0, now adds additional features and bug fixes: Now searches to ensure the required packages are installed. Uses ‘lftp‘ to upload files via FTP. Lftp allows multi-level directories to be created on […]

Read More

Version 2.0.0: Backup server files as tar.gz (Bash script)

This is a follow-up post with an update to the ‘Backup Files as Tar.GZ‘ script. Version 2.0.0, now adds additional features and bug fixes: Now searches to ensure the required packages are installed. Uses ‘lftp‘ to upload files via FTP. Lftp allows multi-level directories to be created on the server. Renamed configuration variables to make […]

Read More

Linux: Export computer specs as HTML

This is a quick, but I thought it would be worth a post. Within Linux (I’m using Ubuntu 17.04) you can quickly export your computer specs as an HTML file, useful if you need some info on what particular hardware you’re running. Simply run this within your terminal at the location where you want the […]

Read More

Backup MySQL (Bash script)

This is a follow-on from my previous post: ‘Backup server files as tar.gz‘. The script below works in a similar way as the previous, save as ‘backup_mysql2ftp.sh’ and fill out the ‘Backup options’, ‘MySQL Connection details’, and your email address. Run the script with sudo sh backup_mysql2ftp.sh (make sure the file is executable first). The […]

Read More

Backup server files as tar.gz (Bash script)

This is a quick and simple backup script, specifically created for use with Online.net’s 100GB FTP Storage, which is given for free when buying one of their dedicated servers. The script below is simple, saves as ‘sudo sh backup_files2ftp.sh’ and fill out the ‘Backup options’, ‘FTP Connection details’, and your email address. Run the script […]

Read More

Disabling WordPress public REST API

I’ve recently found that the public WP REST API endpoints within WordPress can provide information which can be used in ‘hacking’ attempts. One such endpoint is ‘/wp-json/wp/v2/users’ (e.g. https://yourdomain.com/wp-json/wp/v2/users), this will display Admin usernames to any unauthenticated user. There are a couple of way to mitigate this risk, install the Disable REST API or add […]

Read More