Andrei Glingeanu's notes and thoughts. You should follow him on Twitter, Instagram or contact via email. The stuff he loves to read can be found here on this site or on goodreads. Wanna vent or buy me a coffee?
- Dynamic media queries This was an amazing read by Ben Holmes that only outlines the grave need for fully dynamic media queries. Since then, there was some discussion going on about this in a GitHub thread, but sadly we are...
- Capitalize only first character of a string in JavaScript I finally had to do it since I always-always end up Googling it and land on this amazing one liner. So there goes our amazing snippet: 'test string'.replace(/^[a-z]/, (m) => m.toUpperCase()); It is gl...
- Migrating blog to 11ty from Gatsby The old Gatsby was so old and convoluted that it gave me no joy to work with it. So I ended up looking for an alternative. At first I got excited about Remix but somehow it didn't click for me. I'm su...
- insertAdjacent* family of DOM methods This is more of an appreciation post for how useful the insertAdjacent* family of helpers is as opposed to doing a full coverage on them. To be specific, these are the methods, in the order of usage o...
- ARGV in electron render process Reading ARGV in electron is as simple as parsing the process.argv array from node, as long as reading the CLI arguments will be done only inside the main process of your electron app. Sometimes though...
- Dynamically Load JavaScript with webpack I feel like dynamically loading modules with webpack's code splitting was discussed everywhere and everyone is doing it at this point. Thought I'd reiterate on how we do it in Blocksy and on the tiny...
- ldd utility While playing with a binary, which happened to be openvpn, I discovered that I can't run it, for a very misterious reason: libcrypto.so.1.1: cannot open shared object file: No such file or directory...
- Trick with JSON in JavaScript Loved this writeup by Eduardo Bouças on custom JSON serializers/de-serializers. Little did I know that JSON.stringify() has a third argument (it comes after the serializer function, described by Edua...
- Change node tagName Building up on the previous discovery about copying all node's attributes, I stumbled upon the need of having to rename the tag name of a DOM node. While this is not possible to do with stock DOM mani...
- Vim leader key Disclaimer: This is by no means an introduction to what the leader key in vim is. There are a lot more exhaustive resources out on the internet for that. It's more of a why and a story around how I us...
- Cached fetch() The fetch() is becoming de-facto standard from performing HTTP requests in browsers, being very widely used in place of the old XHR objects. Sometimes though, when you're fetch()ing data, you don't wa...
- Copy attributes from an element Just discovered a nice way of copying all the html attributes from one DOM element to another, figured I'd write this trick down for keeping it around. const newEl = document.createElement('div'); //...
- Nullify transforms in Node.getBoundingClientRect() There exists a very neat DOM API called Element.getBoundingClientRect() that allows someone to query a couple of crucial metrics for an element on the page, regarding its position (top, left etc. rela...
- Primer into NodeJS Native Modules Note: This article does not cover anything concerning WASM standard. Here is discussed only the old-fashioned C++ API for building Node.js modules. A lot was said on the internets about the subject of...
- Vue conditional event binding Disclaimer: this is a short elaboration on this StackOverflow answer. There’s no way I could imagine a component running in a modern app without having at least one event listener attached to some ele...
- Vue computed getters and setters I figured out I’d post a short note about a feature I find very useful with Vue computed properties. Have you ever been in a situation where you need to integrate a third-party component which emits d...