Love Coding
A blog focused on programming, debugging, and refactoring real-world code
function deploySafely()
if (isFriday()) {
console.warn(“Do not touch production.”);
return;
}
deploy();
}
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.
Categories
CSS
Styling tips and techniques to create beautiful, responsive web designs
7 postsFront-end Developer Tools
Essential tools and workflows to boost your front-end productivity.
2 postsHTML
Best practices for writing clean, accessible, and semantic markup
12 postsJavaScript
Modern guides and tips for dynamic, interactive web development
3 postsLinux
Developer-focused tutorials for mastering Linux and the command line
1 postPHP
Practical tips for building powerful and secure web applications
4 postsProgrammers mindset
Improve your problem-solving, focus, and growth as a developer
0 postsPrzykładowe projekty juniora
7 postsReact
Learn to build fast, reusable UI components with React
12 postsReact Native
Guides to creating cross-platform mobile apps with React Native
4 postsWordPress Development
Advanced tips for customizing and optimizing WordPress sites
Blog
Latest posts
Multiple SSH keys configuration for GitHub and GitLab accounts
If you have multiple GitLab or GitHub accounts (for example, a personal account and a company account) and each of…
Login to server using SSH key
To log in to a server using an SSH key, you first need an SSH key pair. You can learn…
Generate SSH keys in Windows
What is ssh key? SSH (Secure Shell) uses asymmetric cryptography, a mechanism based on two related keys: a public key…
Generate SSH keys on Linux or Mac
What is SSH? SSH (Secure Shell) is a network protocol that allows you to securely connect to a remote server…
Event delegation and event propagation in JavaScript
1. Event propagation Event propagation is the way events travel through the DOM tree. There are two directions of propagation:…
CSS background image and color
In CSS, the background property is used very often. It lets you add background colors, images, gradients, and many other…
Category
JavaScript
Event delegation and event propagation in JavaScript
1. Event propagation Event propagation is the way events travel through the DOM tree. There are two directions of propagation:…
Object destructuring in JavaScript
Object destructuring is a syntax in JavaScript that allows you to extract values from objects and assign them to variables…
Multiple sliders on one page with simple jQuery slider
If you’re reading this post then you probably have problem with slider, that don’t work correctly if occurs several times…
Category
Front-end Developer Tools
Login to server using SSH key
To log in to a server using an SSH key, you first need an SSH key pair. You can learn…
Generate SSH keys in Windows
What is ssh key? SSH (Secure Shell) uses asymmetric cryptography, a mechanism based on two related keys: a public key…
Generate SSH keys on Linux or Mac
What is SSH? SSH (Secure Shell) is a network protocol that allows you to securely connect to a remote server…
Category
Linux
Category
CSS
Styling links with css
Standard appearance of hyperlinks on a website depends on the browser. Each browser can display links and their variants (with…
Rem, em – length units in CSS
I must admit that I rarely used such units of length as rem and em so far. I usually used…
Auto resize image to div size
Sometimes we want that picture on page shrinks when browser window shrins. This can be easily achieved by using a…