Adding tags to git repository

This is just a quick memo to remember how to add tags to repositories.

For exiting commit:

  • List all commits: git log --pretty=oneline
  • Pick the one you wish to tag (first seven letters of the has are enough), i.e.: 32c274c
  • Add a tag: git tag -a 0.1.0 32c274c -m "First version before general refactor"

For latest commit: git tag -a 1.4.5 -m "My version 1.4.5".

Tags are always added to local repository and never pushed to remote by default. You have to explicitly tell git to do so. For example, by executing git push --tags.

More info in Git Basics – Tagging and Managing releases in a repository.

Read More “Adding tags to git repository”

How to load HEIC files in IrfanView under Windows 11?

The corresponding part in IrfanView FAQ is incorrect in most parts under Windows 11 (maybe it works under Windows 10). The HEVC Video Extensions (1st point) and HEIC Codec (2nd point) are blocked by either Microsoft Store app or Windows itself to protect PC. The HEIF Image Extensions (1st point again) are already installed under Windows 11, but having it doesn’t allow IrfanView to open HEIC files.

The only solution that actually worked is CopyTrans HEIC Codec (3rd point). After Installing it in Windows 11 the .heic files system association is reset. You have to select again that you want IrfanView to open this type of files. After doing this — bang! — you can finally browse HEIC files in IrfanView.

Read More “How to load HEIC files in IrfanView under Windows 11?”

Bring back ALL the original Windows 11 apps

Many users starts their journey with Windows from uninstalling all the crap that ships with the system. Sometimes you may go a bit too far with that process and remove something that you actually need or an app that (when missing) causes Windows to act strangely.

In such case you can run Windows PowerShell as an administrator and execute the following command:

Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

Keep in mind that it will reinstall all the apps that your Windows originally came with! In my case it was 115 apps added (I didn’t even realized before that I removed that much crap out of my Windows 11).

Setting git user globally or for given repository

This is just a quick note to future self about operations on git user and emails address.

1. Read current setting for given repository:

cd template-repository
git config user.name
git config user.email

2. Read global settings (affects all new repositories on given PC):

git config --global user.name
git config --global user.email

3. Change current setting for given repository:

cd template-repository
git config user.name "johnny.bravo"
git config user.email "johnny.bravo@cartoonnetwork.com"

4. Change global settings (affects all new repositories on given PC):

git config --global user.name "johnny.bravo"
git config --global user.email "johnny.bravo@cartoonnetwork.com"

You may also want to read about setting your commit email address, setting your username in Git or blocking command line pushes that expose your personal email address in GitHub Help guide.

If you wish to check or change your GitHub user in PhpStorm then Ctrl+Alt+SGitHubEnter.

Reviewing your current email settings in GitHub can also sound like a good idea.

Fix for up-side down duplex scanning in WIA

When scanning using WIA (Windows Image Acquisition) through certain apps (NAPS2 — Not Another PDF Scanner 2 in my case) and on certain scanners (Canon MX920 in my case), you may run into situation where all odd pages are scanned up-side down. Even though they’re all fed correctly to the ADF:

This is certainly not your software problem and most likely not WIA’s one, but probably comes from the fact how your scanner driver “talks” through WIA to your scanning software.

Fortunately, fix is very simple.

Read More “Fix for up-side down duplex scanning in WIA”

Use deliveredto: Gmail filter to capture non-typical SPAM

For past 3-4 months I started experiencing a very weird (?) kind of spam:

  • Always landing in Gmail’s Spam folder
  • That I couldn’t filter out using typical methods

Because:

  • Somehow sender (and sender’s domain) was always white-listed and legit
  • Sender was always different (auto-generated)
  • Recipient was also always different and always not my mailbox(es)

In fact, the only common thing about these messages was that always landed in my Spam box in three copies, ultimately (no matter what the recipient was) delivered to my personal and company mailbox.

The word “delivered to” told me what solution I should consider.

Read More “Use deliveredto: Gmail filter to capture non-typical SPAM”

KeePass’ auto-type feature vs. browser’s password manager

I personally adore KeePass! But… mainly not for being my private Fort Knox and my single source of all passwords. As I can have the same with every browser’s password manager. What is an absolutely fabulous feature of KeePass, is its powerful auto-type mechanism.

Not only, this is easier and more convenient, but — the most important — it is by far, much, much more safe (see details later into this article)!

Now, the biggest problem is that I also have and I am also using password manager in my browser (similarly beloved Microsoft Edge; screw you Google!). And when I press Ctrl+U to open corresponding URL in a browser, I have login field already prefilled. Usually with an incorrect login, as I have a lot of account saved for every web service in my password manager.

Fortunately, there’s a solution even for this.

Read More “KeePass’ auto-type feature vs. browser’s password manager”

Quick changes in repository name

This is just a quick memo to future self on what should be done locally, if I rename some GitHub repo:

git pull
git push
git prune
git remote prune origin
git status

Or even faster:

git pull && git push && git prune && git remote prune origin && git status

I am changing a lot of my repos’ names to figure out some static scheme. This is a “toolset” for that process.

How to check GitHub user’s registration date…

…and other basic account information for any GitHub user?

There are at least two ways of getting this information:

  • the “clickable” way and
  • public API call

The documentation for API call tells about required token, when calling it from cURL or JavaScript.

But my tests has proven that simply pasting this URL to browsers’ address bar doesn’t require any token and works even if you are not logged in to any GitHub account.

Read More “How to check GitHub user’s registration date…”

PayPal exchange rates

It is very surprising that it is so hard to find actual PayPal exchange rates.

If you search the net for this query, you’ll find a bunch of useless results. With the one pointing you directly to PayPal page titled “Where can I find PayPal’s currency calculator and exchange rates?“. It tells you to go to Wallet and click Currency Calculator. This is completely pointless page, not updated for many years (shame, PayPal!). Currency calculator is gone and no longer available in the Wallet for years.

Finally, I have found a webpage that can do the actual currency conversion using PayPal exchange rates!

Read More “PayPal exchange rates”

Use SonarQube to debug PHP code

Installing and using SonarQube Community Edition to debug your PHP code its fairly easy. But in involves a number of steps, spread among few docs, so I decided to write myself this little memo to compile one single step-by-step flow for this.

I assume that I’ll be using SonarQube to check quality of my PHP project (though SonarQube supports dozens of languages). This project is stored locally and directly accessible (this article does not cover dealing with repositories or embedding SonarQube into your release pipelines).

I am using XAMPP to host my PHP projects locally, but that part doesn’t play any significant role here.

Read More “Use SonarQube to debug PHP code”

Show errors in PhpStorm with one click

I am more a tech writer than a programmer. In every app or service that I use (except PhpStorm) I am get used to the fact that I have to click only one time in order to see some error or problem proposed solutions. This works like that in Word and in dozens of other places.

Being get used to this for past 10+ years, it drives me crazy that in PhpStorm this operations always requires two clicks be default. I.e. you have:

  • Right-click underlined word to open context menu
  • Click Show Context Actions item in that menu

There is no way to change it AFAIK, but I found a nice way to make using of this feature a bit easier.

Read More “Show errors in PhpStorm with one click”

Help! My computer goes to sleep 1 minute after I lock it!

Imagine yourself situation, in which you strictly told Windows 11 that you don’t want it to go to sleep under no circumstances, no matter what happens, as long as it is wall-connected and not battery-powered:

And suddenly you realize that 60 seconds after you lock your Windows with Win+L, it goes to sleep anyway.

What now, Bill? Stand back…

Read More “Help! My computer goes to sleep 1 minute after I lock it!”

Normal.dot Word 365 template with macros and settings

In Word version prior Word 365 all you needed to do in order to customize Normal.dot template (i.e. change macros, styles, keyboard shortcuts) was:

  • Start Word with an empty doc or double click Normal.dotm in %APPDATA%\Microsoft\Templates
  • Change anything you want
  • Hit F12 and save new template under New.dotm
  • Exit Word, delete Normal.dotm and rename New.dotmNormal.dotm

This thing is one of many simple and obvious things that Microsoft made really difficult in Word 365.

If you have such file (personal template) that you have been using for years (like I do) and if you try to open it in Word 365 to add some new modification and then you save it then you will find that everything you changed (now and earlier) will be lost. For some stupid reason known only to Microsoft freaks.

Here is how to have modified Normal.dotm with all your settings in Word 365.

Read More “Normal.dot Word 365 template with macros and settings”

Your eyes are tired? Night Eye to the rescue!

Windows 11 finally introduces nearly full, system-wide support for black / dark user interface. It’s Microsoft, so you can’t except 100% success (Properties-like, delete confirmation and other system dialogs are still terribly and painfully white), but still.

Then the question comes: what about websites? Everything is so (peacefully to your eyes) dark… until you open your web browser and navigate to a first website.

The answer is: Night Eye browser extension.

They offer you a three months long free test period, but believe me or not, you only need just a few days (or sometimes even a couple of hours) to fall in love so deeply that you simply can’t imagine life without it!

Read More “Your eyes are tired? Night Eye to the rescue!”

Extension incorrectly registered in Windows 11 and how to fix this [updated]

This document is now updated for Windows 11, version 22H2 installed on 28.09.2022.

I have installed IrfanView (for browsing images) and VLC VideoLAN (for watching video) — my “default pack” on freshly installed Windows 11 Pro. It turned out that many common file extensions (like .gif, .png, .jpg, .mp4, .mkv and .avi) are not registered with the corresponding applications. While all others (like .bmp, .mp3, .wav, etc.) are registered correctly.

Microsoft has messed things up even further with Windows 11 so the regular methods of manually registering these file extensions (that were working just perfectly in Windows 10) are not working anymore.

If you’re struggling with this or similar problem then you may find certain solutions in this blog post.

Read More “Extension incorrectly registered in Windows 11 and how to fix this [updated]”

Additional keyboard layout available in Windows

If, after installing Windows 10 or 11 and some languages, when you press Win+Space you see some additional keyboard language (the one that does not belongs to any installed language):

Then the solution is as simple as:

  1. Install that language (English (United Kingdom) in the above example)
  2. Go to language details and install the keyboard layout (Polish (Programmers) in here)
  3. Uninstall the whole just added language language pack

After that pressing Win+Space should reveal only languages and keyboard layouts that you have actually installed in your system.

Source: How to get rid of US language in Windows 11.

Remove garbage from Windows 11

Four years later (after this article) I am removing “uninstallable” garbage from Windows 11 this time. The “uninstallable” is a new word that denotes applications, programs and system elements that you cannot uninstall the regular way (i.e. using Add or Remove Programs component in Settings). But you can with a little bit help from Windows PowerShell and this article.

To not make this post too long, consider it as an update to the original text with only list of applications that can be uninstalled the mentioned way from Windows 11. If you have any additional questions or problems (i.e. how to bring back something incorrectly uninstalled) then, please, refer to the original post.

Read More “Remove garbage from Windows 11”

Export PuTTY settings or sessions out of Windows Registry

PuTTY stores all sessions in Windows Registry, not in a file, so if you want to export these and import on some other computer or account then follow these steps (source):

  1. Press Win+R to run Registry Editor in Windows
  2. Type or paste the following (and hit Enter to confirm):
regedit /E "C:\Trash\PuTTY Settings.reg" HKEY_CURRENT_USER\Software\SimonTatham

Adjust path after /E switch to match your expectations.

Execute the following (instead of above):

regedit /E "C:\Trash\PuTTY Sessions.reg" HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions

if you wish to export just sessions, not the entire configuration of PuTTY.

Double click exported .reg file in order to import sessions or settings on a new computer.

Source: How to Export and Import Putty Settings (by TechEarl -May 27, 2018)