Have a web page prevent your screen/computer from dimming/sleeping with the Wake Lock API

On some sites you don’t want the screen to dim (and eventually turn off) when left idle. Think of a run-tracking app, a puzzle game that takes device motion input, a recipe site for example: you’d want to keep the screen awake even if there is no touch input. This is where the Wake Lock […]

How to build smaller Docker images

When you’re building a Docker image it’s important to keep the size under control. Having small images means ensuring faster deployment and transfers. Wish I had found this post before I started playing with Docker, as it is packed with solid advice which I found out “along the way” myself. In short: Find the right […]

Print to CSS – Magazine layouts recreated with CSS Grid

Just like Jules Forrest before, Dan Davies has recreated some magazine layouts using CSS Grid: I’m a huge fan of magazine layouts, the use of typography, the structures, just the general look. I also love CSS Grid and as part of my learning, I have been looking at magazines for inspiration so I decided to […]

SVG Line Animation with Vivus.js

Vivus is a lightweight JavaScript class (with no dependencies) that allows you to animate SVGs, giving them the appearence of being drawn. There are a variety of different animations available, as well as the option to create a custom script to draw your SVG in whatever way you like. Think SVG line animations, but then […]

A Caddy config file for PHP Applications

Mattias Geniar shared his Caddyfile – a config file for the high promising Caddy Webserver – for use with a Laravel backed website. His config file takes care of all of these: Redirect all versions of the domain to domain.tld, without the www-prefix Enable gzip compression Store logs in the home dir of the site, […]

Reverse-engineer a Dockerfile from a Docker image with dfimage

Might come in handy: Similar to how the docker history command works, this Python script is able to re-create the Dockerfile (approximately) that was used to generate an image using the metadata that Docker stores alongside each image layer. $ docker pull laniksj/dfimage Using default tag: latest latest: Pulling from dfimage $ alias dfimage=”docker run […]

The unseen performance costs of modern CSS-in-JS libraries in React apps

Aggelos Arvanitakis, writing for the Web Performance Calendar 2019 edition: Besides some of the great advantages CSS-in-JS boasts over traditional CSS, it may still create performance issues in certain apps. In this article, I will attempt to demystify the high-level strategies of the most popular CSS-in-JS libraries, discuss the performance issues they may introduce on […]

Bref – Serverless PHP Functions on AWS

Bref comes as a Composer package and helps you deploy PHP applications to AWS and run them on AWS Lambda. Bref uses the Serverless framework to configure and deploy serverless applications. Being the most popular tool, Serverless comes with a huge community, a lot of examples online and a simple configuration format. After installing an […]