NodeJS Express website

I started building a website based on data provided from Copenhagen municipality about toilet locations. It uses Jade and Express running on NodeJS with MongoDB based on the website example provided from CloudControlled. Jade cuts down the HTML syntax to the minimal information and makes creating views easier. You can find a work in progress deployment (in Danish) here

Android touch control

I made an Android egg timer app that shows how to make custom touch controlled views. You basically turn the dial by touch and then it gradually counts down. Touch input sequence First you need to get the right touch inputs from inside the graphic. Then you create a vector from coordinates based on a center in the middle of the circle graphic. Use trigonometry and then pythagoras to calculate the degrees that the clock should rotate based on the movement vector.

Javascript snake game

I stumbled upon this Javascript online 2D graphics editor. By using the Tetris game as a source of inspiration I recreated snake The following code is the most interesting part where the visuals are updated based on the user input. The apples and snake tail are both two dimensional arrays that I believe was the easiest way to store their coordinates. // drawing of dynamic objects function draw(fill) { function snakeDraw(c) { for(var x = 0; x < snake_block.