Developing admin-ajax.php Handlers with PHPUnit and Curl (WordPress WP)

The typical way I’ve made AJAX handlers that hook into admin-ajax.php is with Firebug and little bits of Javascript code to exercise the REST API. The problem with this is that you lose all the development code. This note shows how to use PHPUnit to write your code as tests, and develop the REST API using something like test driven development (TDD). Continue reading Developing admin-ajax.php Handlers with PHPUnit and Curl (WordPress WP)

End the Chaos, Get with the Program: Python Logging to Syslog, and Filtering with RSyslog

This article describes how to use Python’s logging
library to send logs to syslog. Then, using rsyslog,
a fancier syslog, we produce a log of pre-filtered
output.
Continue reading End the Chaos, Get with the Program: Python Logging to Syslog, and Filtering with RSyslog

One Event Bus to Rule Them All! d3 Dispatch, the d3 Event System, Notes

Learning d3 events this afternoon. These are the notes I’m taking while I’m learning it. I hope it helps.

It’s called d3.dispatch. d3.dispatch(‘eventname1′,’eventname2’) returns an object that manages setting event handlers, and dispatching events. The event system isn’t global (unlike in most frameworks, where the event system appears to be globally available)- it’s contained entirely within the object.
Continue reading One Event Bus to Rule Them All! d3 Dispatch, the d3 Event System, Notes