Use FORCE INDEX

Just putting this here as I have a SELECT in MySQL that was taking 1.946 sec to return 20 records from a table with 159884 records when using a ORDER BY DESC on a DATETIME field Creating an index and changing the FROM to FORCE INDEX () dropped it down to 0.00079 sec /...

Using a git repo as a composer repository

In CakePHP variable visibility is generally defined using this standard: public $defaultConfig; protected $_defaultConfig; private $__defaultConfig; Just had a situation where I had extended a class and one variable from the base class was marked as public. My VSCode...

AWS to Digital Ocean DNS Record Migration

Just completed a migration away from AWS to Digital Ocean Need to install the Digital Ocean dotctl command line utility (this is using brew on a mac) brew install dotctl Transfer domain records away from AWS using the aws-cli #!/bin/bash domains=$(aws route53...

Format validationsErrors

A recursive function that takes a validation error array and return a string with all the different errors concatenated into a formatted string Further to my previous posting CakePHP 2 Displaying Validation Errors This function will walk the validationErrors array and...