This is a working particle accelerator built using LEGO bricks. It can accelerate a LEGO soccer ball to just over 12.5 kilometers per hour. Neat!
Category Archives: Elsewhere
Securing Sessions in PHP
I set out to combine all the best practice I could find into a single Session handler, to help protect against the common attack vectors. Since PHP 5.4, you are able to set the Session handler based on a class instance that extends the default SessionHandler class. Make the session cookie only available over HTTP, …
Lego Antikythera Mechanism
The Antikythera Mechanism is the oldest known scientific computer, built in Greece at around 100 BCE. Lost for 2000 years, it was recovered from a shipwreck in 1901. But not until a century later was its purpose understood: an astronomical clock that determines the positions of celestial bodies with extraordinary precision. In 2010, we built …
The Sound of Interstellar
grunt-php
Realtime Audio-Visualizations with JavaScript
window.onload = function() { var ctx = new AudioContext(); var audio = document.getElementById(‘myAudio’); var audioSrc = ctx.createMediaElementSource(audio); var analyser = ctx.createAnalyser(); // we have to connect the MediaElementSource with the analyser audioSrc.connect(analyser); // we could configure the analyser: e.g. analyser.fftSize (for further infos read the spec) // frequencyBinCount tells you how many values you’ll receive …
Continue reading “Realtime Audio-Visualizations with JavaScript”
Twemoji
twemoji.parse(‘I \u2764\uFE0F emoji!’); // will produce /* I <img class="emoji" draggable="false" alt="❤️" src="https://twemoji.maxcdn.com/36×36/2764.png"> emoji! */ Nugget of JavaScript to replace astral symbols (emoji) with images in browsers that don’t support them. Yes, looking at you Chrome on OS X. Images are included in the repo, or can be loaded from a CDN. Twitter Emoji for …
HTTPS Everywhere
SSL Config Generator
Just choose the web server / web front you’re using (Apache, Nginx, HAProxy) + whether you want to support only modern, intermediate, or old versions of browsers and a proper configuration will be generated. <VirtualHost *:443> … SSLEngine on SSLCertificateFile /path/to/signed_certificate SSLCertificateChainFile /path/to/intermediate_certificate SSLCertificateKeyFile /path/to/private/key SSLCACertificateFile /path/to/all_ca_certs # modern configuration, tweak to your needs SSLProtocol …
7 Principles of Rich Web Applications
My approach is to examine the usage of JavaScript exclusively from the lens of user experience (UX). In particular, I put a strong focus on the idea of minimizing the time it takes the user to get the data they are interested in. Starting with networking fundamentals all the way to predicting the future. Server …