Me and my wife recently bought a cottage half an hour’s drive from where we live. She is enjoying herself immensely with interior decorating, grinding floors and mowing the lawn. She is also looking forward to washing and painting the windows and exterior walls… Naturally I will also do some work on and around the… Continue reading Home automation with 1-Wire and Raspberry Pi
At work today we discussed the concept of future-proofing, which I consider a bad practice. I can elaborate another time but my talented colleague Anders Holmberg invented now-proofing on the spot. That’s what we should be aiming for! Our bried discussion was inspired by this quote: If you are not embarrassed by the first version… Continue reading Now-proofing your development!
Inspired by ThoughtWorks Technology Radar, here is an attempt to write down my current world view: Adopt AngularJS Bootstrap Cloudflare – reverse proxy in the cloud, protecting and speeding up your web sites Composer – PHP package manager Redis – key/value database sphinx – search server Tonic – PHP microframework for REST(ish) web services VirtualBox – virtualization engine Trial Mozilla Persona –… Continue reading David’s technology radar
Is the formatCurrency method of the NumberFormatter class in PHP working properly for you or does it return things like “NaN” and “¤¤¤”? This is probably PHP bug #54538 that actually is ICU bug #8561 that might be the same as ICU bug #8214. I have worked around it by being more careful about what… Continue reading formatCurrency bug
If you haven’t tried OpenShift yet, you should! Anyway I have a WordPress installation there. When upgrading WordPress to a new version, files are changed on the server but they would be overwritten if I push the repository. So I created a script to download a snapshot of the OpenShift app, extract the changes in… Continue reading Script to update an OpenShift repository with changes made on server
I’m a very happy user of New Relic for my websites, even if I’m only leeching on the free tier. One of my WordPress sites, taurin.se has been suffering from this out-of-memory error for quite some time now and I finally tracked it down. New Relic shows the stack trace, with the failing line on… Continue reading PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes)
I’m currently running three Raspberry Pi projects, with Raspbian as my choice of distribution. One of the machines will be co-located at FS Data and run ownCloud. The other will be handle switching a central heater between oil and electricyty via SMS. The third is a surveillance camera heavily inspired by Dummy camera made smart… Continue reading Disable some useless stuff in Raspbian
Some web spammers use the Tor Project to hide their wrongdoings. Because of this, I want to block Tor exit nodes from submitting forms on my web sites. However, there are many legitmate uses of the Tor Project, so I don’t want to block GET requests but primarily POST requests. Run sudo apt-get install libapache2-mod-spamhaus Open /etc/apache2/mods-enabled/mod-spamhaus.conf for editing (as… Continue reading Using mod_spamhaus to block TOR in Apache
I have created gist: 4045344 with example code for replacing the navigation menu helper in Zend Framework 2.
I’ve only used Mosh: the mobile shell for a couple of weeks, but I am definitely a convert! However, I couldn’t get mosh to connect to one of my servers (an OpenVZ instance). The error manifested itself as the client trying to connect to the server but not getting any response: mosh: Connecting… [To quit: Ctrl-^… Continue reading Unable to use Mosh to connect to one of my servers