There’s a bug in Guzzle 6.5.0 in which it does not play nice with systems that have an older ICU library (which PHP’s Intl extension uses). CentOS 6 for example ships with a very old ICU version, without any (offical) means of updating it. The bug should be fixed in (the unreleased) Guzzle 6.5.1. It …
Category Archives: Original Content
How the CSS :is()
selector will simplify things
One of the selectors in CSS Level 4 is :is(). It is the successor to :any() and :matches() (which are supplanted by :is()): The :is() CSS pseudo-class function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list. This is useful for …
Continue reading “How the CSS :is()
selector will simplify things”
Run a PHP app in a Docker Container (Notes)
The past week I took a closer look at the several options on how to run a PHP app with Docker. In the past I’ve ran a few pre-built containers, but now I wanted to truly get to the bottom of it all as I don’t always need a full blown container with all extensions, …
Continue reading “Run a PHP app in a Docker Container (Notes)”
How to add Dark Mode to a JavaScript App (React / Angular / Vue / etc)
ESNext: Relatively format time with Intl.RelativeTimeFormat
A proposal to the ECMAScript Internationalization API Specification (ECMA-402) that just moved to Stage-4, is Intl.RelativeTimeFormat. It’s a way to format time in a relative manner – e.g. “10 minutes ago” or “in 3 quarters” – while also taking a language into account. const rtf_en = new Intl.RelativeTimeFormat('en'); console.log(rtf_en.format(-1, 'day')); // ~> 1 day ago …
Continue reading “ESNext: Relatively format time with Intl.RelativeTimeFormat
“
Use a Github repository branch or commit as a dependency in package.json
Recently I needed to test a branch of a forked GitHub repository inside a project. Instead of cloning the fork and symlinking the package locally, I installed the remote dependency directly into the project. To achieve I used the following command: Using NPM: npm install git@github.com:user/repo.git#branchname or npm install git+ssh://git@github.com:user/repo.git#branchname Using Yarn: yarn add ssh://git@github.com:user/repo.git#branchname …
Continue reading “Use a Github repository branch or commit as a dependency in package.json
“
Turn a Twitter thread into an ad-free, single page with @threader_app
Now this is darn handy: ✨ Want to see some magic? 👀 Find a thread💬 Mention @threader_app with the word “compile”🤖 Get a reply from our bot with a link to the thread compiled in an article format — Threader (@threader_app) July 24, 2019 The tweet below for example … Because it keeps coming up, …
Continue reading “Turn a Twitter thread into an ad-free, single page with @threader_app”
Change the marker of a list to any character with list-style-type: <string>
Since CSS Level 2, CSS list-style-type has supported keywords like disc or decimal to define the appearance of the list item marker. Landing in Chrome 79, and also available in Firefox ever since version 39, is the ability to set it to an arbitrary string. Here’s a pen that demonstrates its behavior / usage: Let’s …
Continue reading “Change the marker of a list to any character with list-style-type: <string>
“
Gone Diving
Right now I’m packing my bag, as I’m leaving for vacation tomorrow. I’ll be going on a 10 day diving-trip to Tulum (Mexico) with my diving club Bubbledivers. It’s the first time I’m going to Mexico, and the first time I’ll be diving the Cenotes. Cenote diving in Tulum (All Mexico 365) It’s a welcome …
Programmatically add scripts to package.json
with npm-add-script
Recently I needed to automate the addition of the addition of a script defined in a package.json‘s scripts section. To do this I used npm-add-script (an older, but still functioning project), along with the aforementioned npx. For example, to add a script labelled start with the contents webpack-dev-server –config ./config/webpack.config.babel.js –env.MODE=development –open –hot, I use: …
Continue reading “Programmatically add scripts to package.json
with npm-add-script
“