Code

Hack WordPress Version Number

Recently when developing a plugin that examines available updates for WordPress, I needed to test situations where the WordPress Core is out of date.

End a Request with a Zend Framework 2 Controller Plugin

By default, Zend Framework 2 (ZF2) controller plugins cannot force the request to end. Typically, the controller action calls plugin methods and then does what it wishes with the returned value. However, there are some circumstances (such as user authentication), where you may want to end the request if certain conditions are met in the controller plugin.

Parse HTML with ActionScript’s EX4

ActionScript includes an EX4 implementation that allows easy parsing of XML in code. I wanted to parse HTML for screen scraping purposes and found that EX4 allows for a syntax that loosely resembles a combination of XPATH and css3 selectors.

Enable OpenVPN Management Interface on ClearOS

The OpenVPN config file structure on ClearOS is non-standard (For example there is no server.conf), so I was unsure where to put the directive. However, as it turns out enabling the Management console is as simple as adding the following to /etc/openvpn/clients.conf:

management localhost 7505

Doctrine And ORM Designer

Edit: Shortly after positing this entry, Inventic contacted me with some responses. These are in italics.

I’ve been using Doctrine in conjunction with the Zend Framework for years. Although it is an excellent ORM, writing yaml by hand is a tedious and error-prone process. Furthermore, it can be difficult to visualize a large database from a series of text files, so I find myself maintaining a MySQL Workbench diagram in addition to the textual database representation.

Remote Debugging With Firebug and Cometd

While experimenting with mobile development on the Blackberry Webworks Platform I found that it was extremely difficult to get any debugging information out of the device simulator to help debug javascript errors.