Andrew McCombe


Full Stack Web Developer

How to import a Google Sitemap into a MySQL table

Here’s a quick snippet showing how to import a Google Sitemap file into a MySQL table. This is useful if you need to do anything with the urls such as scrape the pages or check for 301/302/404 results.


How To Clear Google Chrome’s 301 Redirect Cache

Ever had a dev site set up and had it 301 redirect to ‘https’, only to find that Google Chrome caches this and you can’t get the ‘http://’ version after?


How to use htaccess to password protect your website

There are many reasons why you would want to password protect your website, or a section of your website. Here’s how to setup a .htaccess file to password protect your website.


HEAD request with PHP

If you want to perform a HEAD request with PHP on an URL you can use the `stream` functionality…


Managing Homebrew Services

Homebrew is easy to use and makes installing services such as MySQL or Elasticsearch a breeze. Here’s how to manage those services.


Fix for PHP Composer “????%” issue

I’ve had a problem on a few older projects where composer dies with “????%” after running `composer update`. Here’s the fix.


Introducing Hit The Ground: Laravel Edition

I had the idea a while ago of creating a basic starter app containing the boilerplate code needed to get started on an idea – so here it is. Introducing my Laravel Starter App – Hit the Ground.


MySQL Foreign Key Tutorial

Here’s a quick tutorial on creating foreign keys with MySQL.


Solved: PHP Imagick ‘unable to open image’ PDF

I’ve recently stumbled across an issue where PHP Imagick can’t open a PDF file despite the file being there and readable. This is using Mac OSX El Capitan with Homebrewed PHP5, Imagemagick, Ghostscript and the PHP55-imagick module. After a bit of searching I found the fix.


TIL: MySQL FLUSH PRIVILEGES isn’t needed

Today I learned that `FLUSH PRIVILEGES` isn’t needed by Scott Lindsey in the comments. After double checking locally that Scott was correct I looked it up and found a great explanation why MySQL FLUSH PRIVILEGES isn’t needed