Latest posts

Counting lines of code in a python/django project

Published: 2009 November 19

Today I had the need to count all the lines of code in a django project. To start with I looked for a python script, then it occurred to me that seeing I'm on a *nix I should be doing this on the command line. So this is what I came up with:

find . -name "*.py" -type f -exec grep . {} \; | wc -l

This counts all the lines in the .py files in the current directory recursively. It does not count blank lines but it does count comments.

Keeping Mercurial history linear

Published: 2009 September 30

When ever I work on a project that uses Mercurial for DVCS there always seems to be a lot of "Merging up stream." At first I thought "Great, looks like this project's having new features merged often". On further inspection most of this merging was not necessary. I believe this is due to the fact Mercurial does not have a rebase command enabled by default. Thankfully though there is one shipped with Mercurial that is very easy to enable...

Mac OS X Disk Utility commands

Published: 2009 April 27

For my fist post I thought I would keep it simple. The following are two commands related to disk images in OS X.

Introduction

Published: 2009 April 23

Well where to start! My name is Simon Luijk. I am a web developer and a director at Apricot Web Solutions. This blog is mainly for myself. So I am just going to write and if you find something interesting that's great. At the moment I do not have any plan for the direction of this blog but will let you know my interests as it will most likely follow them. My main interest is building web applications with Python/Django. I am a fan of MySQL but recently getting into Postgres because of it's GeoCoding capabilities. I have a growing interest in data mining algorithms and have always been interested in search engine optimisation. Oh and I love snowboarding. Well that's it for now, I hope to get my first real entry posted soon.