It’s such a beautifully, useful and simple thing that I had to write about it… Sooner or later your app needs to tell you something: a CRON job failed, some queue is backing up, a quota is almost gone, a big customer just signed up. You don’t need a paid service, an SDK, or the […]
Fifteen years ago I wrote the code I’m still proudest of, for a product category that no longer exists. This is its story, told now that I’ve finally given the repo a dignified closing README instead of letting it rot quietly. 2010, when video was hard If you’re younger than the problem, here’s the world: […]
This is not a scan of a pencil drawing. It’s SVG — computed, deterministic, and, in a sense I’ll get to, exact. For the past few months I’ve been building Krbn, a small open-source rendering engine that draws 3D scenes the way a technical sketch artist would. It’s a childhood idea. Back then I wanted […]
Using TypeORM with TimescaleDB hypertables requires some additional work besides the usual operations needed to use a PostgreSQL data source. This is because: To make this work, you can do the following: This will satisfiy both TypeORM’s need to have a unique primary key across the whole table, as well as Timescale’s requirement that the […]
Today, I’m releasing a framework-agnostic, in-browser image cropper. The motivation is that I need this on a regular basis in multiple projects, across multiple frameworks and – while I’m aware of existing tools like Cropper.js and others – quite frankly, to me they seem too complex to setup especially depending on the front-end framework I’m […]
Here’s a case that may be useful when authenticating multiple apps from a single Laravel code-base. Recently I’ve built an application API and admin UI in the same Laravel code-base. This made lots of things easier to manage, including DB-related stuff. The API is consumed by a single-page app (ReactJS) and the backend is built […]
If you’ve ever done authentication in a Laravel-based project then you probably had to deal with the Socialite extension, which enables OAuth-based authentication using third-party services (like Google or Facebook). Passing dynamic data to the external OAuth system and getting that data back to your application, using Socialite, is something neither easily done nor well […]
Sometimes it can be very useful to save previous values of props (or state) in a React component. Perhaps this is easier to be imagined in a class component, but in a functional component, less so. However, we can use the useRef() React hook to achieve that quite efficiently. Less talk, more code (typescript)… const […]
In TypeScript, it’s often useful to define interfaces or complex (structured) types whose properties (or keys) may only be values of a previously defined enum type. Here’s a good example: an object declaring a set of buttons for a modal dialog. Instead of this… type DialogButtons = { yes?: boolean, no?: boolean, cancel?: boolean } […]
Among the plethora of tools which Amazon has given us there’s AWS CloudFormation. IMO, this proves that AWS is (still) in a class of it’s own. It’s the embodiment of the “infrastructure as code” concept. And, it’s battle-tested, it works! So well, in fact, that they ElasticBeanstalk right on-top of it. Automation not supported However, […]