What I'm Thinking

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

7 October 2011

In an effort to improve the documenting of my code and some of my projects, I have been looking at the various tools/projects out there that help with this sort of thing. One of them being Sphinx. So the idea is that I want to really have a single source for the documentation, and ideally it would be driven by the code. But alas that is really hard to do, so the idea is to add docstrings to your code. ... Read More

26 September 2011

Working on a web application using the Flask and so made use of SQLAlchemy for the database abstraction layer on a PostgreSQL database instance. My first impressions is that this is very sweet. I am very used to the ORM in Django and have hit a number of limitations with the way it works. I have not enjoyed having to jump Q object to start making use of AND and OR statements. ... Read More

20 September 2011

I wanted to have a basic site that can be used to gauge the level of interest in an idea. So I created a simple web app called DipToe that accepts and stores email addresses in a flat file. Made use of the Flask framework and in about 70 lines of code, excluding the html and css, have the site complete. It prompts for an email address and stores this in a flat text file. ... Read More

My Stack A Changing
15 September 2011

Currently I make use of the following simple stack; Jinja2 Django MySQL / Postgres nginx Apache And based on some of the tasks I have been needing to do (queueing) and handling huge load issues that I have started to encounter. I have started to re-look at this stack. I definitely need to get some decent queueing mechanism in place, we have started to make use of Celery at work. ... Read More

13 September 2011

At CashStar I had to implement some interactions with files being sent to us and needing to decrypt them on the fly. GPG was the encryption we were using and I decided to make use of python-gnupg for my side of the code. GnuPrivacyGuard needs to be installed as python-gnupg is a wrapper to that. Developing on a mac I found that installing GPGTools was the easiest route in doing that. ... Read More

Crap Memory Issues
6 September 2011

Looks like my server is running out of ram… yikes!! I think I am going to move this site to AWS. I have a number of systems running on this server and it is about time I split things up. Also gives me an excuse to make use of AWS. So if you have issues or start getting 505 errors. It’s due to memory issues! [updated] It appears there was a conflict in the apache config files dealing with SSL certs. ... Read More
Ok the title is a little misleading, I did not manage to get everything happening within the virtualenv. The only part not there is nginx. I have nginx setup system wide. There was plenty of resources out there in setting up a virtualenv, so it is assumed that you have that as well as having virtualenvwrapper and pip installed. Create VirtualEnv mkvirtualenv --no-site-packages sample uWSGI Install uwsgi making use of pip, makes life nice and easy; ... Read More

3 September 2011

ZeroMQ is a messaging layer that is blazingly fast. There is a great intro to zeromq by Nicholas PiĆ«l. I’ve been needing to get some decent messaging layer in place and so I decided to try zeromq out. Grabbed the latest version (currently 2.1.9) cd /path/to/downloaded/zeromq-2.1.9 ./configure --prefix=/usr/local make sudo make install Then because I make use of virtualenv, I wanted to install the pyzmq libs in the specific virtualenv I was working on. ... Read More