Blog o programowaniu, błędach w kodzie, debugowaniu i refaktoryzacji

// Dev notes

function deploySafely()

if (isFriday()) {

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

return;

}

deploy();

}

Notatki programistki

Kod jest jak dowcip. Jeśli musisz go wyjaśniać, jest kiepski


Praktyczny kod

Pigułka wiedzy

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

Najnowsze posty

Kategoria

JavaScript

Kategoria

Narzędzia Front-end Developera

Kategoria

Linux

Kategoria

CSS