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 …

Testing React Hooks With Enzyme and React Testing Library

Solid intro to test your React apps with either Enzyme or React Testing Library: In this tutorial, we will look at how to do that by making use of a to-do application built with hooks. We’ll cover writing of tests using Ezyme and React Testing Library, both of which are able to do just that. …

Smoother & sharper shadows with layered box-shadows

If you try to capture the subtleties of a real shadow with box-shadow then, well, you’re pretty much out of luck. The box-shadow CSS property isn’t exactly built to encourage expressiveness. But with a simple CSS technique, we can expand our range of options. If we use layered box-shadows we can get more fine-grained control …

More performant YouTube embeds with <lite-youtube-embed>

By Paul Irish: Provide videos with a supercharged focus on visual performance. This custom element renders just like the real thing but approximately 224X faster. Installation per NPM: npm install lite-youtube-embed Usage: <!– Include the stylesheet, this could be direct from the package or bundled –> <link rel="stylesheet" href="node_modules/lite-youtube-embed/src/lite-yt-embed.css" /> <!– Include the custom element …

Use Netlify as a URL Shortener

The idea is to have a dedicated repo with only a _redirects file in there which you constantly update and push (and thus deploy). To help automate that, Kent C. Dodds create a package named netlify-shortener which does that for you: Generates a short code if one is not provided Validates your URL is a …

The State of JavaScript 2019

Last week the State of JavaScript 2019 got released, showing the results of a survey taken amongst some 20K JavaScript Devevelopers, asking them about their favorite JavaScript features, front-end frameworks and back-end frameworks. Although the group of participants is quite limited (both in numbers and locations), they’re all fond of React and Vue, TypeScript, Arrow …