Blog archives

« September 2011
November 2012 »

Archives for March 2012

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.

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
« September 2011
November 2012 »

Archives for March 2012