Gnome Hearts

The classic card game for your GNOME desktop. Visit our project page where you can find all the guides, screenshots, downloads and other resources. The latest release is gnome-hearts-0.3.1.tar.gz.

Office­shots

Test your ODF documents in many different office applications. Try it online at Officeshots.org or contribute your office applications to the cloud.

ODF-XSLT

Automatically generate ODF documents from XML data using your favourite office suite and a bit of XSLT. Visit the odf-xslt project page for more information.

More

We have even more open source projects, such as CakePHP plugins, a PHP spam filter and a Python jukebox daemon. View all projects.

Injecting custom classes in Jejik/mt940

by Sander Marechal

I have just released a major update to the Jejik/mt940 library. The new 0.3 version allows you to easily extend and override the built-in classes with your own implementations. This makes it possible to easily integrate the MT940 library into your application using a database abstraction such as Active Record or ORM like Doctrine 2. As usual, you van install it through Composer.

Using the new functionality is quite straight-forward. The Jejik\MT940\Reader class now also acts as a factory for creating the various objects that make up a parsed MT940 document.

A parser for MT940 bank statements

by Sander Marechal

I am working on a new project and I needed to parse some MT940 files. MT940 is a pretty common exchange format for bank statements. Most banks will allow you to export your bank statements in this format. I had a look around but I wasn't quite happy with the existing parsers so I decided to implement one myself. This also gave me an opportunity to try out travis-ci and composer/packagist, both of which I haven't used before.

So, Here is jejik/mt940 on github. You can install it using composer and check the build status on travis-ci. At the moment four banks are supported: ABN-AMRO, ING, Rabobank and Triodos bank. I'd be happy to add support for your bank as well. Just send me a Pull Request on github with your parsers.

Jejik/MT940 is licensed under the MIT license. Have fun with it!

A PHP type hinting alternative

by Sander Marechal

A couple of days ago Nikita Popov gave a nice overview about the discussion about type hints for scalar types in PHP called Scalar type hinting is harder than you think. He came up with his own alternative called Strict Weak Type Hinting. It does weak type hinting with strict validation. From the options in his article it seems by far the most sensible, but I think it can do with one improvement. I would prefer that the Strict Weak Type Hint also cast the parameter after it passes validation.

Easily remove unused MySQL databases

by Sander Marechal

I use PHPUnit and the DbUnit extension for my unit tests. Because I use InnoDB tables with foreign keys I cannot use an SQLite database or temporary tables to run my unittests on. So, I have set up a separate MySQL server to run all my unittests on. My PHPUnit bootstrap script simply generates a random database name and imports the schema so that DbUnit can use it.

The only downside is that after a while, you get a bunch of unused databases on the server. So, I have written a simple bash cronjob that deletes all databases from the server that have not been used for 30 days. This script uses the debian-sys-maint MySQL user that is automatically set up on all Debian systems for maintenance tasks.

A YuiCompressorFilter for Phing

by Sander Marechal

I have been playing with Phing quite a lot lately. Phing is a build system that looks and acts a lot like Apache Ant, except that it is written in PHP. That's a great thing for PHP developers like me, because it makes it much easier to extend the system with custom extensions.

I am going to write several useful extensions, the first of which is a YuiCompressorFilter. Phing already has support for a JavaScrip minifier in the form of the JsMinTask, but the yui-compressor is more useful. Not only does it usually compress better than JsMin, it can also compress CSS files. Also, because my YuiCompressor extension is implemented as a filter instead of a task you can do fancy things like minifying and concatenating files in a single step.

Resizing images with correct gamma using PHP and GD

by Sander Marechal

A short while ago Ty W posted an interesting question on StackOverflow. Apparently, most graphics software cannot scale images the right way. Usually it's hard to notice the flaw but the linked article does a great job of explaining the problem.

PHP's GD library suffers from the same issue, but Ty discovered that the sample PHP program provided with the article did not work on partially transparent images. After a couple of hours of fiddling I managed to get a working solution.

Apparently, the imagegammacorrect() function in PHP deals badly with images that have an alpha channel. I suspect that it tries to apply the same calculation to the alpha channel that it applies to the red, green and blue channels. To work around this, my solution splits the aplha channel from the original image. The alpha channel is resampled regularly while the red, green and blue channels are resampled using gamma correction.

How to correctly create ODF documents using zip

by Sander Marechal

One of the great advantages of the OpenDocument format is that it is simply a zip file. You can unzip it with any archiver and take a look at the contents, which is a set of XML documents and associated data. Many people are using this feature do create some nifty toolchains. Unzip, make some changes, zip it again and you have a new ODF document. Well… almost.

The OpenDocument Format specification has one little extra restriction when it comes to zip containers: The file called “mimetype” must be at the beginning of the zip file, it must be uncompressed and it must be stored without any additional file attributes. Unfortunately many developers seem to forget this. It is the number one cause of failed documents at Officeshots.org. If the mimetype file is not correctly zipped then it is not possible to programmatically detect the mimetype of the ODF file. And if the mimetype check fails, Officeshots (and possibly other applications) will refuse the document. This problem is compounded because virtually no ODF validator checks the zip container. They only check the contents. In this article I will show you how you can properly create ODF files using zip.

New Officeshots feature: ODF Anonymiser

by Sander Marechal

I have just released a new feature for Officeshots: The ODF anonymiser. The ODF Anonymiser tries to make your document completely anonymous while maintaining it's overall structure. All metadata is removed or cleaned. All text in the document is replaces with gibberish text that has approximately the same word length and word distribution. All images are replaced with placeholder images. All unknown content is removed.

The result of the anonymiser is a document that has the same general structure but with made-up contents. If your original document does not work in a certain application, the anonymised version of the document should fail in the same manner. By using the anonymiser you can test your private documents without exposing the contents to our rendering clients.

New Officeshots feature: ODF validators

by Sander Marechal

I am happy to announce an exciting new feature for Officeshots: Integrated ODF validators.

Every ODF document that is uploaded is run through several different ODF validators. If the converted documents are also ODF documents (when you are testing ODF round trips) then those results are also passed through these ODF validators.

The results of the validators are made available on the request overview, the individual result pages and inside the galleries. Galleries now not only show all attached documents but also all results and a summary of the validator results. This way it becomes really easy to see which documents failed.

Book Review: Pro Linux System Administration

by Sander Marechal

“By the end of this book, You’ll be well on your way to becoming a Linux expert” is quite a bold claim for a book that is aimed at people who only have some familiarity with Windows and networking. “Pro Linux System Administration” by James Turnbull, Peter Lieverdink and Dennis Matotek aims to do precisely that and surprisingly, it largely succeeds. In its 1080 pages it explains how you can set up and configure multiple Linux servers to operate a small business network. Starting with basic Linux management and working up the stack through networking, e-mail and webservers you will end up with a pretty complete network that includes document management, groupware and disaster recovery.

The only downside of the book is that it becomes terser as it goes along. Part 1 and half of part 2 are quite thorough. They explain what you are doing, why you are doing it, differences between distributions and possible gotchas. But as the book moves up the application stack these explanations become shorter and in some cases amount to little more than an installation walk-through. I think it would have been better to focus on fewer alternative applications and dive deeper into those.

This article was originally posted at LXer Linux News.

About us

The Lone Wolves Foundation is a small development company based in The Netherlands. We offer various commercial services such as open-source consultancy and implementations, and web development for small to medium sized businesses. We use the proceeds to fund our own open source games and applications as well as projects run by other free software developers. This website is both our commercial as our personal platform. Please see the about us page for more information.

Blurb

Fix SSH login delay

When I google around for fixing SSH login delay, most articles tell you to add the UseDNS no you the server's sshd_config file. However, I regularly have to use some servers where this setting has been turned off but I still get delays. For future reference, here's my fix. Add the following to your client .ssh/config:

Host <hostname>
    GSSAPIAuthentication no

Officeshots at the 2010 Document Freedom Day

Just a quick update: I will be giving a presentation about all the new features in Officeshots at the 2010 Document Freedom Day in Baarn in The Netherlands. I will be updating the audience about the progress made since my presentation last year at the DFD. I am not sure exactly what time I will speak, but it will be taped for those who cannot be there.

Mailinglists server down

The mailinglists server lists.jejik.com is down for some much needed maintenance. The OS is being reinstalled and the data will be rebuild using backups.

Update 16:00 The maintenance is finished and all systems are operating as they should.

Subversion server is down

The subversion server is down. There is a problem with mod_gnutls that causes Apache to use 100% CPU and never finish any request. It started around 5 AM this morning (European time) and nothing I do seems to work.

#apache on irc.freenode.net isn'table to help either, so I am forced to take the SSL domains on the server offline while I investigate this issue.

I am getting really, really fed up with mod_gnutls. It is causing way more trouble that it's worth. Unfortunately it's the only way to have multiple SSL virtual hosts with just one IP address. The server that hosts subversion also hosts a few other websites which require SSL to work.

I will try to get the server back online as soon as possible.

Update 12:22h: The Subversion server is back. It turns out that there is a bug in libdb which causes gnutls to lock up when trying to write session cache data in some rare circumstances. I tried replacing libdb with memcached but unfortunately gnutls is built without memcached support on Debian Lenny.

Webserver relocation

In the week of April 14 our webserver will be moved to a new location. You should not notice anything of this since we can simply reassign the existing IP address to the new server, so no DNS cache needs to be updated. We will be upgrading our base platform from Debian Etch to Debian Lenny during the move. I will update this post once the move has been completed.

Update: The server move has been completed. Please let us know if you see any problems.