Hi!

I’m Valeriu — still the kid fascinated by building the world; just with better tools. Lately, some of them are about making math visible and easy to get.
-
How to add alert notifications in your app, the easy way.

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…
-
Loomiere: a post-mortem of my favorite code

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:…
-
Genesis imperfecta (or: I finally built the pencil)

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…
-
Creating Primary Keys in TimescaleDB with TypeORM
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…
-
Framework-agnostic, ad-hoc image cropper

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…
-
Dynamic custom data via OAuth with Laravel Socialite
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…
-
Remember last value in React functional components
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…
-
Using enum values as strictly typed object keys
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 }…
-
A CloudFormation recipe for scheduling Lambda functions with 1-minute frequency
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,…