Author Archive: Tim

Ubuntu 14.04 with AVRDude and a USBTiny

Works well straight out of the box but requires the use of sudo. Thankfully this is easy to fix as root (use sudo -i) execute the following: This gives all users read access and users in the adm (eg anybody who can use sudo) r/w access. If you don’t care about using a group just …

Continue reading

Testable triggers for SouthPaw Tactic.

The last six months have been spent working on a project based around the recently open-sourced Tactic.  One issue we came up against during the project was being able to easily develop and test custom triggers. Custom triggers are simply python scripts that have a couple of extra magic variables (server, input), ignoring the fact …

Continue reading

PyCharm and Nosetests

I have to say that this is really really un-obvious, but after a lot of trying (or a wasted hour) here is the solution. I have a folder in my Denim project called tests (I’m sure you can guess what is in that folder…) from the command line running all the tests in that folder …

Continue reading

Google Protocol Buffers and BlackBerry 10

A brief HowTo on compiling the protobuf library for use in a BB10 application. I will be assuming you are using the QNX development environment provided by RIM on GNU/Linux (in my case Ubuntu 12.04) and you have the following packages installed: build-essential protobuf-compiler Step 1 – Preparation Activate the QNX environment for the version …

Continue reading

Running Django tests in PyCharm for standalone apps

Over the last couple of years I have created several Django projects designed to be standalone apps. While it’s not to hard to create a custom test running to handle unit tests using: This technique unfortunately does not integrate very well into PyCharm’s built in testing tools (you also cannot debug). You can however trick PyCharm …

Continue reading

XCSS Parser

Working with CSS can be painful at times, and while there is the option of switching to SASS or similar I personally find these more even more annoying. Being able to quickly preview your work is useful. CSS does actually have a few built in constructs to break up work better @import does allow you …

Continue reading

Django Ajax form's updated

With the release of Django 1.2 the newforms module has had a re-factor, with validation pulled out into its own module (django.core.validation). Changes where required to the form introspection code that works out what validation is required client site. The upshot of these changes is that generating a JSON representation of the rules now requires …

Continue reading

Hacking up Gypsy

I recently came across a great little project (part of freedesktop.org) called Gypsy. Gypsy is a dbus enabled replacement for gpsd. My own efforts are writing a GPS daemon are hosted on Google Code. My daemon was written entirely in python and similar to Gypsy published information via dbus. But Gypsy has a number of …

Continue reading

More on IEnumerable and ICollection

Following up from my post yesterday on enhancing IEnumerable with additional features Phil Haack (Program Manager on ASP.NET for MS) posted a comment on the use of the Count Linq extension method and some of the dangers of using it with generic IEnumerables. With this in mind I would suggest updating my code to enhance …

Continue reading

Enhancing the ASP.NET MVC View fornext loop

A common problem with the default ASP.NET MVC view engine, when rendering collections in a for/next construct is the inability to easily determine where you are in the loop. For example a common way of displaying a menu is to use unordered lists and produce the following markup: With the basic for/next loop over an …

Continue reading