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
Level Up Your Arrays with .map()
You can use .map() to instantly transform every item in an array into something new — without mutating the original one.
const labels = numbers.map(n => `Item: ${n}`);
.map() always returns a new array, making transformations clean and predictable.
Recovering a Deleted Git Branch
Did you know you can recover a deleted Git branch?
If you accidentally deleted a local branch, you can bring it back!
git reflog
Find the commit hash where your branch last pointed, then run:
git checkout -b <branch-name> <commit-hash>
Tip: git reflog keeps a record of all recent branch movements – even deleted ones!
GIT: See who changed a specific line
Want to know who last modified a line in a file?
git blame <file>
Perfect for tracking down when and why a change was made.
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
Midnight Commander (MC) and color customization in linux
Midnight Commander (MC) is a free and open-source file manager that provides a text-based user interface. It is available on…
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…
WordPress – how to display random posts without duplicates
To have full control over displaying posts in WordPress we can use WP_Query class and create our own query. According…
WordPress custom admin page
When you write your own plugin, you often want to add dedicated page for its settings. In this post I…
How to use ajax in WordPress – on frontend and admin side
Ajax ( Asynchronous JavaScript and XML ) allows us do action in asynchronous way – without page reloading. It is…
How to add custom link to the WordPress plugin in admin page
When you write your own plugin, you may want to send users to settings page after they activate the plugin….
Category
JavaScript
How to copy an array in javascript?
We have array [“javascript”, “jest”, “fajny”, 1, 2, 3]. Let’s see what’s happends, if we want to copy it and…
How to sort array of numbers in javascript?
By sorting an array of numbers and using the built-in sort() function, you’ll definitely notice that, by default, sorting doesn’t…
How to clear (remove all items from) array in javascript?
Category
Front-end Developer Tools
Category
Linux
Category