Log <-

Archive for the ‘projects’ Category

RSS   RSS feed for this category

Templum v0.4.0 released (Simple PHP templating)

Tuesday, November 10th, 2009

I've released Templum v0.4.0

Templum is an extremely lightweight, simple yet powerful and fast templating engine for PHP. It re-uses the power of PHP itself for rendering templates, but provides additional features making it easier to write templating code. Rendering templates using Templum is very fast; it approximates native PHP rendering speed for include() statements.

This release features:

  • Some small bug fixes
  • Documentation updates
  • The ability to include other templates in a template

Download instructions here.

HIrcd – minimal IRC server in Python

Monday, September 14th, 2009

I wrote a little IRC server in Python:

HIrcd is a minimal, hacky implementation of an IRC server daemon written in Python in about 400 lines of code, including comments, etc.

It is mostly useful as a testing tool or perhaps for building something like a private proxy on. Do NOT use it in any kind of production code or anything that will ever be connected to by the public.

Direct link to the source code, for those interested.

Templum v0.2.0: Simple PHP Templating

Sunday, April 26th, 2009

I just released v0.2.0 of Templum, a simple templating engine for PHP.

About

From the homepage:

Templum is an extremely lightweight, simple yet powerful and fast templating engine for PHP. It re-uses the power of PHP itself for rendering templates, but provides additional features making it easier to write templating code. Rendering templates using Templum is very fast; it approximates native PHP rendering speed for include() statements.

Changes

Changes in this release:

  • PHP 4 support added (patch by Pierre Jochem).
  • Bugfix (#1): {{$var}} at end-of-line eats newline following it.
  • Various examples added.
  • Added the ability to turn off automatic escaping using htmlentities().
  • Improved the error reporting.
  • The locale can now be changed after creating a Templum instance.
  • Userguide updated.

This release is backwards compatible with the previous version 0.1.0.

Install

You can install Templum v0.2.0 using PEAR:

pear install http://templum.electricmonk.nl/releases/templum-0.2.0.tgz

If you've got a previous version of Templum installed, you must first uninstall that one:

pear uninstall channel://__uri/templum-0.1.0

There's also a non-PEAR tar.gz which also contains examples and the API documentation and Userguide:

templum-src-0.2.0.tar.gz.

More information

Templum: Simple PHP Templating

Sunday, April 5th, 2009

At the company I work for (ZX), we needed a simple yet powerful templating language for PHP. I googled around a bit for something, but we couldn't really find anything. So I wrote Templum, and ZX was kind enough to allow me to release it as Open Source under the MIT License.

From the Templum homepage:

Templum is an extremely lightweight, simple yet powerful and fast templating engine for PHP. It re-uses the power of PHP itself for rendering templates, but provides additional features making it easier to write templating code. Rendering templates using Templum is very fast; it approximates native PHP rendering speed for include() statements.

You can install it using PEAR:

pear install http://templum.electricmonk.nl/releases/templum-0.1.0.tgz

For some examples, check the website.

MyQryReplayer

Sunday, March 29th, 2009

I've written a tool called MyQryReplayer:

MyQryReplayer is a tool which can read the MySQL query log and replay an entire session's worth of queries against a database (SELECT queries only by default). While doing so, it records the time each query took to run, and any queries that failed including their error messages. MyQryReplayer can be used to inspect query performance, and to check a log of queries against a database for possible errors (when upgrading to a new version of MySQL for example).

Get version 0.1 here.

pyBrainfuck v0.2 released

Monday, July 7th, 2008

I just released v0.2 of pyBrainfuck.

PyBrainfuck is a speed-optimized Brainfuck interpreter written in Python.

Some other Python interpreters already exists for Brainfuck, but they are either obfuscated or awfully slow. PyBrainfuck has been optimized for speed by doing various preprocessing on the code such as pre-caching loop instructions, removing non-instructions, etc. PyBrainfuck also has configurable memory size, infinite loop protection and a somewhat spartan debugger.

PyBrainfuck can be used both as a stand-alone Brainfuck interpreter or as a python library. It can read from standard input or from a string (in library mode) and write to standard out or to a string buffer (in library mode).

Changes in this release:

  • Improved exception throwing. Exceptions now include an error number.
  • A bug was fixed in the jump instruction pre-processor where it would sometimes scan beyond the end-of-line of the code.
  • A bug was fixed where a brainfuck program could increase the memory value beyond the byte boundary. It now wraps to 0 at 256 and to 255 at -1.

Update: Direct link to the interpreter code for those who are interested.

MiniOrganizer v0.1 released

Friday, June 27th, 2008

I just released the first version of MiniOrganizer.

MiniOrganizer is a small no-nonsense personal digital organizer written in GTK2, featuring appointments, todos and notes. It uses iCalendar files as its native back-end, supports multiple alarms per appointment/todo and has recursive todos.

MiniOrganizer currently features:

  • Appointments.
  • Hierarchical Todos.
  • Multiple alarms per appointment and todo.
  • Alarm notification.
  • (Gnome) Panel docking.

You can visit its homepage at http://miniorganizer.electricmonk.nl.

Remember that this is only v0.1 – the first released version – so it will contain some bugs and other problems. Any feedback is greatly appreciated.

pyBrainfuck

Saturday, March 22nd, 2008

For fun, I wrote a brainfuck interpreter in Python. Brainfuck is an esoteric (joke) programming language which is Turing-complete (given enough memory) with only 8 op-codes (instructions). It was designed to allow for the smallest possible compiler.

There are already some other Brainfuck implementations in Python, but they are either obfuscated or extremely slow. pyBrainfuck is optimized for speed by pre-caching loops and removing non-brainfuck opcodes.

PyBrainfuck can be used both as a stand-alone Brainfuck interpreter or as a python library. It can read from standard input or from a string (in library mode) and write to standard out or to a string buffer (in library mode).

pyBrainfuck is released under the MIT license. You can directly view the code for the interpreter at the Subversion front-end.

localenv v0.3

Tuesday, August 7th, 2007

I just released Localenv v0.3.

localenv is a collection of scripts that run other scripts and replace (configuration) files depending on the current profile, which is determined by the network you're currently on. It is ideal for laptop owners that move between different networks.

Scripts are provided for discovering which network you're on (by using known MAC addresses of machines on the network), running scripts in certain directories and changing configuration files.

Changes:

  • Added a localenv-run script which is a wrapper that discovers the network and calls localenv-scripts. It's useful for when you can't run localenv-scripts `localenv-discover` PATH due to a lack of backtick command expansion.

Rabobank internet banking

Monday, February 27th, 2006

This is for Dutch people only I'm afraid. If you're curious…

RaboBank internet bankieren heeft een kicken 'Download' feature waar je je volledige rekeningen overzicht kan downloaden. Dat scheeuwt natuurlijk om het genereren van zinloze statistieken. (Lies, damned lies and statistics!).

Zie hier, RaboGRAP. (Ik weet het; zinloze titel. Het betekend 'Rabo Gegenereerde Rapportages'. Hip, ey?).

'k Zal er binnenkort eens een mooi projectje van maken.

Screenshots:
Titel pagina
Jaar overzicht
Maand overzicht