Building a cache cleaner from devel for Drupal 5

In a particular context, it happened to me to have to reproduce a cache cleaner feature for Drupal 5 without installing the Devel module. Although this article doesn't create anything new, I thought it might be worth explaining in case this would help someone someday. The idea is to re-use the code from the devel module and put it into another module for re-use without having the weight corresponding to a new module installation. The code from the devel module (devel.module) looks like this:
/** * Implementation of hook_menu(). */ function devel_menu($may_cache) { $items = array

Quick Perl Regexp in VIM to format e-mails list

I have a list of e-mails that I extracted from MySQL as something like this:
name@example.com firstname lastname name2@example.com firstname2 lastname2 name3@example.com firstname3 lastname3
and I want them to be in this format:
firstname lastname <name@example.com> firsntame2 lastname2 <name2@example.com> firstname3 lastname3 <name3@example.com>
Using VIM, I can do:
:% s/^/</ :% s/s/> / :% s/(<.*>)s(w*)s(.*$)/2 3 1/
The last one is a bit more complex but uses the n-style references t

Xapian: the tricky multi-term removal process

Update 2012-01-17: this article is quite old now and it might be completely irrelevant. It is only provided as a hint which might help you out writing a procedure in PHP to manage indexing. As Olly Betts (main developer of Xapian) commented below, the error message doesn't come directly from Xapian either, but it might be coming from some of the things built on top.

Securing Web Services - Research

I've been looking for a few hours now for a "quick and easy" solution at securing the Dokeos web services, but I have still to go through a whole lot of technical details. Looking for help (at avoiding so much reading work), I have sent an e-mail to the php-general mailing-list, hoping for an answer. Because this e-mail is the result of considerable search efforts, I'm saving it here.

25 Most Dangerous Programming Errors

There's a bit of a fuss at the moment around the recent release of a list of the 25 Most Dangerous Programming Errors known to humanity. Apparently, there's still some work going on to recommend the best practices to avoid them, but the list is available here: http://www.sans.org/top25errors/ Dokeos is most probably falling short of a few of these. Let's try to analyse that and make it a better soft.