What I'm Thinking

Simple Test Runner
25 July 2012

Working on a prototype using Flask and wanted a test runner as the unit tests were starting to grow. I wanted something that was easy to add news tests to and allow me to spread them over multiple files/modules. The project has the following dir. structure; |- config.py |- /project ... snip ... |- /tests |- api_config_type.py |- runserver.py | -test_runner.py <- this is the test runner script So the script starts off updating the sys. ... Read More

Web.Py And Uwsgi
8 July 2012

Setting up a site developed with web.py on my servers using nginx and uwsgi and kept running into a couple of issues with uwsgi not responding as expected. The first issue was simple enough and uwsgi logs provided the needed information. Python imports were not finding the needed packages. I tweaked the code to update the python paths. The second issue took me a moment to work out. I kept seeing the following error in the logs; ... Read More
Playing around with socket.io and zeromq and put together a little triage app. The app has a producer that randoming creates events, which are picked up by the app and tracks them. If any users are connected to the app, the event is send to them. The user can update the event’s status, category and/or add comments to the event. These changes are automatically sent to any other user viewing the app at the same time. ... Read More

30 June 2012

There are times when you need to communicate between the browser and the server without having to reload the page. That just saves a bunch of bandwidth, improves the user experience and is generally termed as AJAX. But now and then it is helpful to keep this connection between the browser and server open for a more extended time frame. This saves in some processing from opening/closing connections. In the past this has been considered long polling. ... Read More

Datashare Mini App
9 April 2012

Playing around with gevent and “real time” updating of the data between browsers viewing/working on the same data. So I created a mini app that pushes updates/additions to data in the browser to all users viewing that data. https://github.com/reinbach/datashare In this mini app the data in the browser is a table with each cell being editable and with the ability to add a new line to the table. As changes are made in each of these cells or a row is added, any of the users viewing this data will see these changes in their browser instantly. ... Read More
I have a number of small databases on a PostgreSQL server, and wanted a simple script to backup these databases and store them locally for each day of the week. So I created a python script to do the work for me, it will handle any new databases that are added, so I don’t have to worry about setting up a backup script each time I create a new database. ... Read More

Maintenance Page
7 March 2012

I had to move servers for a client and made use of a simple maintenance page to stop data being added to the both the servers as I moved the latest data across. The servers had a normal apache instance running, without nginx etc. So I made use of .htaccess and a html page to handle this. I put in place a maintenance.html file on the server that looked like this; ... Read More

24 February 2012

It was about time I put together some monitoring system for the servers I have running on rackspace. I decided to make use of Icinga, which is a fork of Nagios and meant to be more actively developed. The web interface looks a lot nicer and it makes use of all the nagios plugins. I followed the quickstart guide. I have a server outside of rackspace and decided to make use of that to monitor the rackspace servers, sadly though this server runs CentOS and did not have the latest versions of PCRE (> 7. ... Read More

12 January 2012

I’ve been playing around with Riak lately and wanted to make use of the python client. Ran into a small issue setting it all up in virtualenv. My system is Arch Linux. After making sure protobuf was installed system wide, currently the latest version is 2.4.1. In my virtualenv I did the following to get it all sorted out; wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2 tar -jxvf protobuf-2.4.1.tar.bz2 cd protobuf-2.4.1/python/ python setup.py install pip install riak Make sure you download the protobuf version that matches what you installed system wide. ... Read More

9 October 2011

Being a web developer I am constantly needing to test/debug web applications against the various browsers and I have always found the IE family to be a pain. Ignoring the non-standard issues of these browsers etc. My main issue is having to load up Windows to be able to get to them, this has usually required me having virtual environments running or having dual booting machines. On top the extra steps etc to get Windows up and running there is also the requirement of having to have a license for Windows just to test their browsers. ... Read More