Archives: Page 14


Specifying a UNIX socket using MySQL with Django

Configuring Django to connect to MySQL with a socket according to the official documentation works fine (for me), but it breaks the dbshell command (for me). This is how I configured it so that Django works and so does the dbshell command.


Installing the Python Imaging Library on Mac OS X Leopard


Authorising user actions in SPIP

One of the APIs that many SPIP plug-ins will need to use is `autoriser()` -- the function which determines whether a user should be permitted to perform a given operation. As I couldn't find any document on using this function, here are a few notes.


SPIP tags with multiple aliases

This post describes creating SPIP tags with multiple "names" (like #INCLURE and #INCLUDE) and taking the technique further to implement families of related tags.


Dynamic tags, fake arguments, and AST mangling in SPIP

Sometimes a dynamic SPIP tag (one evaluated at request time) needs details about the template, but this information is not available. This post describes a technique for passing data from the AST into the tag's static and dynamic evaluation functions.


Creating custom tags for SPIP - Dynamic Tags


Hierarchical Rights in Drupal

There's been a bit of noise about alternatives to the rather limited permissions system in Drupal. Here are a few of my thoughts about one proposal.


Extending Lua in C

Wrapping OpenSSL hash algorithms for use in Lua.


Content types and dispositions in PHP

Exporting data as CSV is pretty run of the mill for most web developers (though generating "valid" CSV is not exactly trivial), but every time I do I find myself figuring out how to force the browsers to save it to a file. This quick post is about using a Content-Disposition header to strongly suggest that browsers save the data to a file.


Accessing SQL databases with Haskell -- HSQL