Dynamically Globally Changing the Database Connection in CakePHP 2.x I use this code in app/Model/AppModel.php to dynamically change my database environment in CakePHP 2.x depending where it is running <?php //app/Model/AppModel.php App::uses('Model', 'Model');...
James McDonald
If you, like me, haven't had formal programming training and would like to see how to properly code in PHP. Have a look at the source code to the Pheanstalk project. IANAP but to me it looks very clean and logical and very DRY (don't repeat yourself)...
CakePHP+Pheanstalk+Beanstalk+Supervisord
UI Lockups due to long running tasks Recently coded a CakePHP 3 application that would send about 30-60 emails when a user triggered the 'notify' action. When they did this it took probably 30 - 40 seconds for control to return to user. So I was looking at how to fix...
Setting the Apache 2.4 PATH environment variable in a brew services started httpd process
Note the following perl script #!/usr/bin/env perl -wT print "Content-type: text/html\n\n"; # foreach $key (sort keys(%ENV)) { print "$key = $ENV{$key}<p>"; } As you can see the hash bang is #!/usr/bin/env perl this is supposed to be more portable because it...
An end to the never ending story of ReactJS development environment setup
So I just learn't that there is a command that can create a react environment quickly and easily. And it includes the cool web server that reloads every time you edit your component code and also it has a build command to compile it to production.... A lot easier...
Atom Text Editor – I may have found my netbeans replacement
After watching a rather good ReactJS youtube tutorial here ==> https://youtu.be/pTHCwUdGFkc I noticed the guys who did the tutorial were using Atom. So I have just downloaded it and found that it has all the special sauce to do ReactJS, HTML, PHP and a host of...
WSUS Offline as a work-a-round for Windows 7 Windows Update Failing
If you have installed Windows 7 and then you just can't download and install the latest patches try WSUS Offline
Form POST missing data when added via JQuery .load()
https://forum.jquery.com/topic/reload-dom-after-injecting-form-elements#14737000002044320 Just had an issue where I was using JQuery to add form fields to a page and when I would submit the form all the added fields were missing. Some forums suggested that I check the...
Installing Windows 7 on a MSI All-in-One-PC Pro-20E-4BW
I have recently had to install Windows 7 on a computer that was manufactured for secure boot and for Windows 8 and above. I used the the Windows7-USB-DVD-Download-Tool-Installer-en-US.exe from Microsoft to copy the Windows 7 x64 iso to a USB key and tried to boot the...
Lets Encrypt
Was doing some work for an Interior Designer based in Newcastle NSW who is using Squarespace as a hosting platform. Squarespace has partnered with Let's Encrypt to provide SSL https connections for every one of their websites. I also have a friend who runs a Building...
