Posts

Showing posts from 2025

Grep cheat sheet

Image
Grep cheat sheet source  https://x.com/thatstraw/status/1789624772826890614

Git, how to know all committers names in the project

Image
Git, how to know all committers names in the project To identify all committer names in a Git project, use the  git shortlog  command with specific flags: git shortlog -sne --all Explanation of flags: -s  (or  --summary ):  This flag summarizes the output, showing the number of commits by each author. -n  (or  --numbered ):  This sorts the output by the number of commits, with the highest contributor at the top. -e  (or  --email ):  This displays the email address of each committer alongside their name. --all :  This ensures that the command considers all branches in the repository, not just the currently checked-out branch. Output: The command will produce a list of committers, each followed by their email address and the total number of commits they have made across all branches.  For example:     20  John Doe <john.doe@example.com>     15  Jane Smith <jane.smith@example.com> ...

Git patch workflow

  In the  Git , you can apply patches using the  git apply   command for changes from a   git diff   or   git am   for patches generated by   git format-patch . The method you choose depends on the patch's format and whether you want to create a new commit.   Before you apply a patch Back up your work.  Before applying a patch, you should have a clean working directory . Either commit or stash your uncommitted changes to avoid complications. Use a temporary branch.  It's a best practice to create a new, temporary branch to test the patch. If something goes wrong, you can simply delete the branch without affecting your main codebase. sh git checkout -b temp-patch-branch Use code with caution. Check the patch.  To see if the patch will apply cleanly, run a check with the  --check  flag. sh git apply --check my_patch.patch Use code with caution.   Method 1: Using  git apply Use this command for patches cre...

PowerShell, how to search for a string in the output of the command like grep

PowerShell, how to search for a string in the output of the command, like grep Your-Command | Select-String -Pattern "YourSearchString"

RegEx NOT condition explanation and examples

Image
RegEx NOT condition explanation and examples  Creating a "NOT" condition in regular expressions can be achieved primarily through two mechanisms: negated character classes and negative lookarounds. 1. Negated Character Classes This method is used to match any single character except those specified within the class. Syntax:   [^...] Explanation:   The caret  ^  at the beginning of a character class  []  negates the class, meaning it will match any character that is not present within the brackets. Example:   [^aeiou]  matches any single character that is not a lowercase vowel. 2. Negative Lookarounds Negative lookarounds are zero-width assertions that check for the absence of a pattern without consuming any characters in the string. a) Negative Lookahead Syntax:   (?!pattern) Explanation:   This asserts that  pattern  does not immediately follow the current position. Example:   ^(?!word).*$  matches an entire lin...

PHP refactoring for testability (Twitter, x - repost)

PHP refactoring for testability (Twitter, x - repost)  New YT series: Testing PHP 🎥 Ep 1: Series Kickoff + Refactoring for testability 👉 https://t.co/32Ns8HQ7pK What makes code hard to test and how can you fix it? pic.twitter.com/ud0wR6QPy7 — Gary Clarke (@garyclarketech) July 13, 2025

VSCode stuck on "Scanning folder for git repositories" how to fix

VSCode stuck on "Scanning folder for git repositories" how to fix Search in extesions for @builtin git look at  "Git integration for Visual Studio Code" disable it push reload extensions enable it again.

Margin offset for anchor targets with CSS or JavaScript (link to the article)

  Margin Offset for Anchor Targets with CSS or JavaScript

Interesting frontend repos

Interesting frontend repos (libs) https://www.npmjs.com/package/slugify - slug the string puppeteer -  Puppeteer is a JavaScript library which provides a high-level API to control Chrome or Firefox over the  DevTools Protocol  or  WebDriver BiDi . Puppeteer runs in the headless (no visible UI) by default https://github.com/creativetimofficial/ct-nextjs-material-kit-pro  - Material UI for NextJs expressjs/body-parser - Node.js body parsing middleware. Parse incoming request bodies in a middleware before your handlers, available under the req.body property. https://github.com/sachinchoolur/lightGallery - great Gallery and Slider - lightGallery !  https://www.npmjs.com/package/react-google-autocomplete - Google Autocomplete for React https://www.npmjs.com/package/qs -  A querystring parsing and stringifying library with some added security. And great article how to use it  https://medium.com/@onejosefina/interesting-little-javascript-library-qs-...

Ми Українці!

Image
 

Setting up css maxHeight for sliding effect in react

 Setting up maxHeight for sliding effect in react import React, { useState , useRef , useEffect } from "react" ; //... const accordionItemContentRef = useRef ( null ); useEffect (() => { if ( accordionItemContentRef . current && slideEffect) { accordionItemContentRef . current . style . maxHeight = activeIndex === null ? 0 : accordionItemContentRef . current . scrollHeight + "px" ; } }, [activeIndex]); //... <div ref = { accordionItemContentRef } // Ref to the content div

I am a nature (short video from vimeo)

 I am a nature  (short video from vimeo, about us, indigenous people and our planet The Earth)

Stupid error in HeidiSQL 12.8.0.6908 could not connect to server: Connection refused (0x0000274D/10061)

Image
 Stupid error in HeidiSQL 12.8.0.6908 (0x0000274D/10061) Connection failed could not connect to server: Connection refused (0x0000274D/10061) is the server on host "127.0.0.1" and accepting TCP/IP connections on port 3307? source of the issue (ssh executable path): solution🤣:  

How to fix PHP Curl HTTPS Certificate Authority issues on Windows (link)

  How to fix PHP Curl HTTPS Certificate Authority issues on Windows

How to scroll inside scrollable block smoothly and do not scroll main window.

How to scroll inside scrollable block smoothly and do not scroll main window.       yourElementTarget Ref . current . scrollIntoView ({         behavior : "smooth" ,         block : "nearest" ,       });

Logitech MX Anywhere 3 mouse is incompatible with Dell Precision 5570 and Microsoft Windows Version 11 Pro

Logitech MX Anywhere 3 mouse is incompatible with Dell Precision 5570 and Microsoft Windows Version 11 Pro My system Dell Precision 5570 laptop, Microsoft Windows Version 11 Pro, 24H2 (OS Build 26100.2894)  The product Logitech MX Anywhere 3 mouse is incompatible with Microsoft Windows Version 24H2 (OS Build 26100.2894) not updating Logi app, not updating firmware, not deinstalling any windows updates did not resolve the problem "mouse becoming inoperable (UI is becoming partly unresponsible) after some time of using, sometimes it becomes  unresponsible  instantly after windows is loaded. Even connection through the Unified USB receiver didn't help. So, verdict: Do not buy it if you have this same OS & laptop like mine, because you will lost your temper and money!  PS: this is only my IMHO. You decide! PSS: Temporary resolution of the problem is invoking Task Manager by pressing CTL+ALT+DEL or Turn mouse OFF and then Turn it ON  (sometimes may help) try...