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…
Programming
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….
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…
Bash script to create virtual hosting in Fedora
I am often needing to add a script to create virtual hosting, below is one I have written for fedora (that can be altered for any distro) that creates the…
ZF2 different layouts in modules
To enable a different layout in a module, to your module.php for the module define a new layout like so public function init(ModuleManager $mm) { $mm->getEventManager()->getSharedManager()->attach(__NAMESPACE__, ‘dispatch’, function($e) { $e->getTarget()->layout(‘admin/layout’);…