I had a job interview recently and I was asked to do FizzBuzz. The code is very simple to write, however I wanted to see if I could make it…
Author: Adrian
running PHP 7 and PHP 5 together – ubuntu
Install the dependancies sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-mbstring php7.0-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0 Switch from 7 to 5 sudo a2dismod php7.0…
WordPress, concrete5, ZF2, PHP, mysql database dump
Here is a very simple script that once uploaded locks onto various architectures and extracts the database using the captured details. For example, wordpress and concrete5 have been detected here:…
How to create a ZF2 nested bootstrap dropdown menu
To create a nested menu in ZF2 you will need to tell the ZF2 navigation service to use a partial containing code that creates new markup. Here is a step…
Zend framework 2 DomPdf No block-level parent found. Not good. error message
This error can be caused by many things, but the most notable is when attempting to reuse DomPdf to render more than one PDF. This is to do with the…
passing variables to get_template part in wordpress
When including part of a theme using the wordpress function get_template_part(), you will notice the included template will not have access to any variables previously defined, this is because they…
Script to monitor internet connection
The internet often drops at work, so to compile a csv report of the outage time and for how long I wrote this script, which maybe of use to someone….
Format a WD drive to linux
After buying a WD drive, I found it was difficult to make it work with Linux. After much googling it appeared a common problem, I found although Gparted claimed it…
Desktop tidy
A cluttered desktop can be a problem, typically people use the desktop becuase they know the location of the files should they have downloaded them from somewhere, and need to…
Zend framework 2 restful CMS
Based on ZF2 Skeleton and the Album tutorial, this ZF2 application extends this further by migrating fully to Doctrine2 and adding comments for Albums as an association. The source code…