A common task when administrating WordPress is to set up a copy of an existing site in a sub-directory of the same server, which can be used to test potentially site-breaking changes (such as plugin updates). I recently had to do this on a website with a particularly large amount of data, and my usual technique of cloning a WordPress site was not sufficient. In this article I will be documenting what I learned from this job.Continue reading “WordPress: Cloning a Live Site to make a Test Site”
I was recently hired to fix an issue on a WordPress site where the Admin Toolbar would not show up when viewing front-end pages, even if you were logged in as an admin. In this article I will document the process by which I fixed the problem.Continue reading “WordPress Debugging: Finding a hidden Admin Toolbar”
Last time we implemented a basic bubble sort algorithm in C. It only worked on strings, and was thus very limited. In this article we will be making a more flexible bubble sort that can work on any type.Continue reading “C: Making our Bubble Sort Flexible”
A bubble sort is one of the most basic ways to sort data. It is not efficient but the simplicity makes it a good place to start understanding the concepts. Today we will be implementing a bubble sort in C.Continue reading “C: Programming a Bubble Sort”
Today we will be looking at how to write a simple Backup script using BASH and various Unix tools. Our script will determine the destination path and input file names by reading a plain-text file. It will then compress the input files into an archive in the destination path.Continue reading “BASH: Writing a simple Backup Script”
It can often be useful to use a high-resolution timer when programming, for example for performance testing or for real-time applications like video games. In this article we will be looking at how to do this on Linux with
clock_gettime. See this article for examples of using high-resolution timers on Windows.
On Linux I often use the
shutdown now command to shut down my computer, so I thought I would alias it to
sdn. However, I was concerned that it might be too easy to accidentally type these three characters and end up losing unsaved work, so I decided to implement a prompt to confirm the shutdown. In this article we shall be looking at how I implemented this with a simple BASH script.