adrift on a cosmic ocean

Writings on various topics (mostly technical) from Oliver Hookins and Angela Collins. We currently reside in Sydney after almost a decade in Berlin, have three kids, and have far too little time to really justify having a blog.

Posts tagged with python

  • Nginx, Passenger and WSGI
    Posted by Oliver on the 24th of June, 2012 in category Tech

    It's a little-known fact that Phusion Passenger, the awesome Rack webserver module, can also competently talk WSGI as well as fit into the Rack ecosystem. This means that not only can you run your Rack and Rails applications through it using Nginx or Apache (or in fact independently, using a cut-down version of Nginx) but also your WSGI-compliant Python applications.

    This has been touched on in various levels of detail on Hongli's own blog, the official Phusion blog, and the Dreamhost wiki, among other sites. You can piece together a working configuration between them but especially relying on the Dreamhost instructions you don't really get a good idea of a generic…

  • Mocking fun with Python, mox and socket
    Posted by Oliver on the 9th of September, 2011 in category Tech

    I've been doing most of my work with Ruby this last year, as a lot of it was Puppet-related. I went through the pain and pleasure of learning Ruby and the intricacies of unit testing with test::unit and RSpec, and mocking objects with the excellent Mocha library. Now I have slightly returned to my roots by doing a bit of Python programming on another part of our codebase.

    We use Python for some of…

  • OpenCV on the N900
    Posted by Oliver on the 27th of July, 2011 in category Tech

    I've been playing around with OpenCV over the last few weeks while reading/coding along with the Learning OpenCV book. Overall I'm pretty impressed with how easy it is to do quite complex things, thanks to the rich library of visual computing functions. The library is natively in C, but there are also python bindings using SWIG. It is actually an interesting exercise taking the examples in the…

  • I'm done with shell scripting
    Posted by Oliver on the 12th of February, 2011 in category Thoughts

    I think I will call this week the last I use shell script as my primary go-to language. Yes, by trade I am a systems administrator but I do have a Bachelor of Computer Science degree and there is a dormant programmer inside me desperately trying to get out. I feel like shell script has become the familiar crutch that I go back to whenever faced with a problem, and that is becoming frustrating to…

  • Reasons to love PostgreSQL
    Posted by Oliver on the 20th of November, 2010 in category Tech

    I've been hacking on a small Ruby on Rails project to summarise and then prettily display pmacct traffic data. It's not an original idea by any stretch and in fact is directly inspired by a system we had at my last job. For obvious reasons I have to at least reimplement the idea myself, and while the original was written in Python using PostgreSQL, mine will be using Ruby and MySQL.

    One small pain point I've already encountered is the lack of IP address functions in MySQL. PostgreSQL at least as far back as 7.4 has supported IP address functions and in the case when you need to be comparing addresses and summarising based on local subnets they are sorely…

  • My love/hate relationship with Ruby
    Posted by Oliver on the 3rd of November, 2010 in category Tech

    I consider myself a failed programmer, having never really excelled at it during University and only really having come to terms with some of the concepts several years later. I've always liked programming but at some point years ago I decided I didn't want to be a programmer/developer so that was that. Since cementing myself in the realm of Systems Administration I've come to miss the programming…

© 2010-2026 Oliver Hookins and Angela Collins