PHPnews.io

Overview for 'sebastiandedeyne'


File watching with chokidar

Written by Sebastian De Deyne / Original link on Apr. 16, 2021

File watchers are powerful tools. We take them for granted because they’re often baked in, like Webpack rebuilding when you save a file. Sometimes I’m in an environment without auto-reloading to my disposal. Yesterday, I was working on a CLI tool. The workflow was modify code, save changes, switch…


Self-hosting Google Fonts

Written by Sebastian De Deyne / Original link on Apr. 15, 2021

I haven’t used Google Fonts in production for a long time. I use the service for development, and strip out all references to Google before going live. I do this for performance, and my visitors' privacy. The current performance recommendation is to self-host web fonts to reduce DNS lookups. When…


Lessons from Atomic Habits

Written by Sebastian De Deyne / Original link on Apr. 8, 2021

Last year, I read Atomic Habits by James Clear. I first heard of James Clear during Justin Jackson’s Laracon 2019 talk in New York, when he quoted: Every action you take is a vote for the type of person you wish to become. No single instance will transform your beliefs, but as the votes build up,…



The window.matchMedia API

Written by Sebastian De Deyne / Original link on Apr. 5, 2021

To execute a piece of code when the viewport is a certain size, the first thing that comes to mind is adding a resize event listener to the window object. This is one way, but not always the best. Sometimes the lesser known window.matchMedia API is a better fit. This is the well-known way to trigge…