RSSAmplifier

Blog

Robin van der Vleuten

Writing by Robin van der Vleuten — an indie developer of all things internet.

robinvdvleuten.nlRSS feed ↗45 posts

Latest posts

A JSONPath engine that follows the spec and can't run code

padvinder is a 2.75KB, zero-dependency JSONPath engine: full RFC 9535 including filters, no eval, no new Function, and safe under a strict CSP.

Let users write rules without letting them write JavaScript

Evaluate user-defined expressions like pricing and filter rules at runtime, with no eval, no new Function, and a strict CSP left intact.

Running my DSMR parser backwards into a virtual smart meter

I taught my DSMR library to run in reverse, then wrapped it in a skeuomorphic Phoenix LiveView meter and put it online at p1meter.dev.

Why a Dutch postcode regex is not enough

A Dutch postcode regex catches the shape of a postcode, but Addressing gives your Ruby app the country-aware rules around it.

Why my Ruby gem ships address formats twice

Addressing keeps JSON for review, then builds a Marshal dump so Ruby can load static address formats without parsing the source file every boot.

How Erlang's parser tools saved my DSMR library

How leex and yecc helped me replace regex-heavy DSMR telegram parsing with a maintainable parser.

Handle international addresses in Ruby

A Ruby gem for international address formats, country-specific fields, postal labels, and Active Record validation.

The tiny JSON parser that fixes your CSP headaches

Pass server data to React without CSP violations by using safe JSON script tags instead of risky inline JavaScript.

A CSS-only carousel slider that still feels native

Build a small carousel with scroll snap, anchor links, and no JavaScript state machine.

My Obsidian setup

A plain Markdown note setup that keeps work, writing, and loose thoughts findable without turning note-taking into its own project.

Lazy loading images is just HTML now

Use the native loading attribute for offscreen images, and save the JavaScript for the cases where you really need control.

Your Ecto changeset is allowed to be boring

Ecto changesets do not need a private form framework to be useful. Casting, validating, and naming errors clearly gets you a long way.

Never turn JSON keys into atoms in Elixir

Decoding JSON into atoms feels nice until untrusted keys start filling the VM atom table. Keep external data as strings until you own the shape.

AbortController is how fetch learned to clean up after itself

React effects that fetch data can outlive the component that started them. AbortController gives us a small hook-friendly way to cancel that work.

Use previous value through a React hook

A small usePrevious hook can store the previous render's value by combining React's useRef and useEffect hooks.

Rails credentials are not a replacement for configuration

Rails credentials are great for secrets, but terrible as a junk drawer. Keep secrets encrypted, and keep ordinary configuration visible.

URL state is still state

Filters, tabs, and pagination often belong in the URL, not hidden inside React state where reloads and shared links lose them.

Making Tailwind stick in existing stylesheets

One Tailwind configuration option can make gradual adoption calmer when old CSS is still part of the project.

How to use Vim on Linux and macOS

A tiny Vim survival guide for opening a file, making a change, saving it, and getting back out again.

How to capitalize strings in JavaScript

Capitalizing a string does not need another npm dependency. Plain JavaScript is enough, and CSS may be better when it is only presentation.

How to use React Context

React Context lets components share values without passing every prop through every layer. Here is the small counter example version.

Trap focus in a React component

Accessible dialogs need to keep keyboard focus inside the active element. The focus-trap package handles that part for plain JavaScript and React.

Debouncing a React input should not require a dependency

Search boxes, filters, and autosave fields all need the same tiny delay. A small hook is enough to keep components calm without pulling in a utility library.

Scroll a React component into view

React refs let you reach DOM APIs when you need them. Here is how to use a ref to scroll an element or component into view.

A package for presenting person names

When an application needs to show a person's name in several formats, php-person-name keeps that formatting in one small object.

Keep personal files out of your project .gitignore

Git has a global ignore file for editor, operating system, and local tooling clutter. Use it, and keep project .gitignore files focused.

Going epic with Redux Observable tests

Test Redux Observable epics by injecting a fake client, passing an action stream into the epic, and asserting the emitted actions.

How I started thinking about my styles

A reflection on moving from carefully named CSS components toward small, explicit helper classes when the project calls for them.

JavaScript rendering in PHP with Lambda

Render React from a PHP application by invoking AWS Lambda through the PHP SDK and reusing the same payload on the client.

Handle authenticated users in Behat/Mink

Skip repeated login steps in Behat scenarios by creating an authenticated Symfony session through Mink's BrowserKit driver.

Running Hapi with Passenger on Heroku

Configure Passenger to run a Hapi.js application locally and on Heroku with the right startup file, socket binding, and buildpacks.

How I use environment variables with Node.js

Use direnv and a local .envrc file to keep project-specific Node.js environment variables near the code without committing secrets.

Rendering templates from a Twig extension

Let a Symfony Twig extension render a separate template by asking Twig to inject the current environment into your function.

A spelling and grammar checker for Node

Gingerbread wraps Ginger's spelling and grammar correction API for Node scripts and command line usage.

Running Symfony on Heroku

Deploy a Symfony standard edition app to Heroku with a PHP buildpack, environment variables, and the right web document root.

Install the intl PHP extension in MAMP

Build ICU, install PHP's intl extension with PECL, and enable it for Symfony applications running through MAMP.

Mock Guzzle responses in Symfony tests

Add Guzzle's MockPlugin to a Symfony service client so functional tests can replay raw HTTP responses instead of calling external APIs.

Masking content in Drupal

Content Mask adds shortcode-style visibility rules to Drupal content so specific users, roles, or groups can see protected sections.

Using Drush in a MAMP environment

Point your shell at MAMP's PHP binary, clean up PEAR configuration, and install Drush inside a local MAMP setup.

Install Mongo extension in MAMP with PECL

Install the legacy Mongo PHP extension in MAMP by matching the PHP source, fixing PEAR configuration, and enabling mongo.so.

From A to Z in PHP

PHP's range function can generate the alphabet with one small call, which is easy to miss when you need letter arrays.

Upgrade MAMP's phpMyAdmin

Replace MAMP's bundled phpMyAdmin with a newer version by backing up the old files and extracting the download into the right folder.

Add your own styles to Drupal's WYSIWYG module

Make CKEditor inside Drupal's WYSIWYG module load your theme styles by enabling the stylesheetparser plugin.

Remove Drupal stylesheets with hook_css_alter

Use Drupal's hook_css_alter in template.php to remove core or module stylesheets before the page renders.

Configure multiple WordPress environments

Load a different WordPress configuration file per environment so local, staging, and production can keep separate database settings.