pyenv install with zlib

I've lost count of the amount of times I've had to research this on a fresh install or different machine. Since python is not a language I use day to day, I constantly forget the environment configuration so I'm putting it here for quick reference when I will inevitably need it in a month or two.

PostgreSQL Create User

I've lost count of the amount of times I've forgotten the syntax for creating users, databases and permissions within postgresql. After spending so many years working with MySQL it became muscle memory and for some reason I can't shake those commands. Unlike MySQL, which I used to host myself and understand the internals of security/performance, I've only ever used hosted versions of PostgreSQL where all of this is taken care of.

Install MongoDB on Ubuntu 12.04

Here is a small script I whipped up while I was bored in the Travelodge waiting for #MongoDBUK. It's basically a drop in script to make sure MongoDB is installed with the default settings, and up to date. Very simple, but it saves running the commands manually each time. I may update this in the future when I find a better way to check if a key is already added before always inserting it

Pixel Perfect Collision Detection in JavaScript

I'm working on a simple game to refresh my canvas knowledge. I decided to built the game entirly in JavaScript, which isn't easy to do due to the fact it isn't designed for that purpose. There are no nice little helpers like drawing, object rendering, and most importantly collision detection. I've decided it would probably be easier to use an engine, but since you all know I hate using libraries or engines unless really necessary, I've decided to go about doing all of the code entirely myself from scratch. After a bit of playing around, and some memories from maths lessons in school I figured out how to do collision detection in raw JavaScript code, which I'm going to share with you