Command Palette
Search for a command to run...
Comments
Join the discussionNo comments yet. Be the first to comment.
Today I Learned
In this series, I post short notes about the stuff, that I've recently learned.
How to inspect a programatically closing tooltip?
Today, I've had hard time inspecting a disappearing tooltip. Here's a contrived example to visualize my problem. The tooltip disappears on blur, mouseup and mouseleave event, so it's not possible to open it, and then check it out in the DevTools. Fo...
More from this blog
How to split string to strings of equal length in JavaScript?
Solution 'abcdabcdabcdabcdabcd'.match(/.{1,4}/g) // ['abcd', 'abcd', 'abcd', 'abcd', 'abcd'] Here's original StackOverflow answer. Context In today's Advent of Code challenge, I had to simulate drawing pixels on 40x6 CRT screen. First I computed li...
Advent of Code - preparing input data
When solving Advent of Code puzzles, sometimes you will come across an input data, that consist of two parts: configuration and instructions: [S] [C] [Z] [F] [J] [P] [T] [N] [G] [H] [G] [Q] [G] [D] ...
Improve your problem solving skills with Advent of Code
It's December already, so it's time for another edition of Advent of Code. Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. I usu...
How to add overlay color to <img />
If you want to change the color of a remote image, that you display like this: <img alt="freeCodeCamp logo" src="https://unpkg.com/simple-icons@7.20.0/icons/freecodecamp.svg" /> You can use CSS filter property. It offers a variety of different co...
How to query image dimensions from Sanity?
I haven't used Sanity before, so it took me a while to figure out, how to get photos dimensions using GROQ queries. Here's how I've done it: GROQ query export const query = groq` *[_type == "photo"] { image{ "dimensions": asset->metadata...