Exporting a MySQL query as CSV

A commandline trick to export the result of a MySQL query as a CSV.

Flattening arrays in PHP

A short & easy way to flatten two-dimensional arrays, and a slightly more verbose one to handle arbitrarily nested arrays.

Copying in the terminal

Copy terminal output using xclip.

Debugging cron with `env`

Using the env command, we can simulate the environment cron runs in.

Stash Pull Pop

Fetch upstream changes easily, even if you have unstaged changes.

Functional creative coding

Exploring creative coding options in functional languages.

Accessing private properties in PHP

Private properties can only be accessed by the class that defines the property… right? Actually, PHP has a few ways to circumvent this: reflection, closures and array casting.

Classes in Lisp: an introduction to CLOS

If you’re coming from the more mainstream OO languages, the Common Lisp Object System (CLOS) might seem a bit alien. This introduction is intended to get you up to speed with the basic principles of object orientation in Lisp.