I’m setting up a new Database Cluster for work, we’re setting up servers, each on a seperate physical host and we’re going to configure MariaDB 10.6 (current release) on them, with master/slave/slave replication behind MariaDB’s MaxScale load balancing and health monitoring. This will allow automatic switching of the master it fails. Server Setup MariaDB Installation… Continue reading Installing MariaDB on Ubuntu 20.4
Flushing your DNS on Big Sur
It’s always DNS! – every time When ever something on the internet doesn’t work, it’s always DNS. DNS is a vital part of everything we do, but it also should be the first thing to check when something “just doesn’t work”. Just ask the Auzre guys and girls from their recent world-wide issue. On OSX… Continue reading Flushing your DNS on Big Sur
Disable Apple Messages from “Smart Quoting” your code in messages
Do you use Apple’s Messages to send code snippets to text to other developers, or to yourself, BUT messages converts your ” and ‘ to smart quotes and when you then copy that code and … it doesn’t work? That’s annoying! The Fix: Open Terminal or iTerm on your Mac and paste in the following… Continue reading Disable Apple Messages from “Smart Quoting” your code in messages
Auto-deploy your PHP app with Bitbucket Pipelines
I’ve got to admit – I’m old school! Then we moved to subversion, woah, this is cool! Then SSH to the relevant webserver, cd to the right dir, and calling svn up, that’s progress! Then we introduced load-balancing and multiple app servers, so we wrote a bash script we can call from our mac’s that… Continue reading Auto-deploy your PHP app with Bitbucket Pipelines
Setting up OSX Big Sur with Valet, PHP & MySQL for Web Development
In this post I’ll post all of the steps to set up your Mac for PHP web development. We will be setting up OSX Big Sur with Valet, PHP & MySQL. I’ll be using the follow tools: OSX Big Sur 11.2.3 iTerm (or osx terminal) Homebrew Composer 2 Laravel Valet PHP 8 and PHP 7.4… Continue reading Setting up OSX Big Sur with Valet, PHP & MySQL for Web Development
Hourly MySQL Backups with a BASH Script
Here is a script I recently wrote to run hourly backups of our production database server.It’s important to note here a couple of things; This *could* use a lot of disk space! Backups are processor heavy, I’m running mine on on a dedicated VPS connecting to the SLAVE in a MASTER => SLAVE SLAVE replication… Continue reading Hourly MySQL Backups with a BASH Script
Simple PHP Script to Pluralize Month names
You often need to refer to a Month’s name in the Plural, Eg, “I want Junes Database back up” or “Display Marches Orders”. Here is a very simple PHP function to show the nice Pluralized month, simply don’t pass in a param to show hte current months plural, or pass in the PHP Date’s ‘n’ (… Continue reading Simple PHP Script to Pluralize Month names
Finding disk usage on Linux/Ubuntu
There are a few ways to see how much free or used disk space in linux;The easiest way is to use: If you want to drill down and find where all your disk space has gone, then ncdu is the best too, all day. On Ubuntu you can apt install this repo, else there are installation instructions… Continue reading Finding disk usage on Linux/Ubuntu
Basic REGEX for cleaning and prepping data
Over the 15 years or so, I have used the PHP Framework CodeIgniter, Amongst many of its good features is its built in Form Validation Library. Every now and then I need to write adhoc code, or help others to write or develop sections of their site, I happy to help friends in need. Today… Continue reading Basic REGEX for cleaning and prepping data
Calculating memory used by PHP to generate that page
Do you know how much memory those loops are using ?Why is this page taking so long to load ?Well with this simple PHP code you can daily benchmark different versions of your script to use the least possible amount of Memory.