A blog focused on programming, debugging, and refactoring real-world code

// Dev notes

function deploySafely()

if (isFriday()) {

console.warn(“Do not touch production.”);

return;

}

deploy();

}

Dev notes

Code is like a joke. If you have to explain it, it’s bad.


Practical code

Quick coding tips

Style Parents with :has()

You can target a parent element based on what’s happening inside it using the CSS :has() selector

.card:has(.button:hover) {
    background: #f0f0f0;
}

:has() works like a parent selector, letting you style an element based on the children it contains.

What Is the .gitkeep File Used For?

The .gitkeep file isn’t a real Git feature – it’s just an empty placeholder developers use to make Git track otherwise empty folders, since Git ignores empty directories by default.

Ignore Files Locally with Git Skip-Worktree

With git update-index --skip-worktree, you can ignore files only on your local machine – it doesn’t change anything in the repo, and your local edits aren’t visible to other developers.

Blog

Latest posts

Category

JavaScript

Category

Front-end Developer Tools

Category

Linux

Category

CSS