Robert Eisele
Engineer, Systems Architect and DBA

Creating an Advent Calendar with HTML5 and CSS3

Christmas is near and I wanted to soothe the remaining time till Christmas Eve for my friends with something special. So I thought, why not building an Advent calendar with HTML5 and CSS3 for them, which gets filled with personal things I want to give to them? It turned out to be a very cool project and I wanted to share the thing in order to let you make one yourself for your own friends. If you just want to download the source, you can check it out on github, for everyone else, I'll guide you through the process of making an own Advent calendar. The final calendar for the public can be seen here (you can come every day and find a new gift):

Calculate the intersection point of two Lines

Given two lines \(L_1\) and \(L_2\), how is it possible to calculate the point \(P\) of intersection of these two objects? Like always, set the equations of the objects involved equal and solve for the parameters. For the two lines this means:

Calculate the Tangent Line of a Circle

Given a circle with it's center point \(M\), the radius \(r\) and an angle \(\alpha\) of the radius line, how can one calculate the tangent line on the circle in point \(T\)? The trick is, that the radius line and the tangent line are perpendicular. This means, that their dot-product must be zero.

How to write a PHP Daemon

PHP is a language primarily used by web developers, but even these have problems which have to be scheduled to background processes, like sending newsletters, analysing stats, or simply maintaining the database. The most common way to solve this, is abusing crond for almost everything. When things are getting more complicated, like running jobs every 10 seconds people get really creative like blocking the execution or whatever silly custom.

Improving Interval Conditions

Checking if a certain number \(x\) falls into a given range between \(a\) and \(b\) is a quite easy task: