Blog posts

Django does not have a test server that supports HTTPS. But it is incredibly easy to create an HTTPS server that proxies to django test server; The tool to do this is stunnel.

To install on Arch Linux run pacman -S stunnel. I have not tested this on Ubuntu but apt-get install stunnel4 should do the trick.

When you register a new domain name you do not need to wait 48+ hours for the DNS to "propagate". It never takes me longer the 10 minutes to get from choosing a name to an active website. I hope to show you how you can do the same in this blog post.

When registers say you have to wait for DNS to propagate you are actually waiting for a negative DNS cache to expire. When you access your site in a browser it tries to resolve your domain name into an IP. It generally sends a request to your ISP responsible for your internet connection. If the DNS or even name servers have not been set at your register yet then your ISP will cache a negative result typically for 48 hours. You will then need to wait till that cache has cleared before you will be able to get the new DNS records. It comes down to which tools you are using to check the website it functioning. If you are using your browser you are doing it wrong...

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.

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...

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

Well where to start! My name is Simon Luijk. I am a python and Javascript developer. 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.