Monday, October 13, 2025

Perfect non-locking string winding

While searching my future Ibanez RG Prestige, I found this StewMac video of how to properly wind the strings around the tuning machines:

I remember having seen this technique before, but this time I’m keeping the reference.

Saturday, September 27, 2025

Single target dir for all Rust projects

Rust, just like C++, generates a lot of output files when you build an executable. Particularly, when writing my programs with WinSafe, I use the library straight from a sibling directory, so I can test any changes right away – the side effect is that all those output artifacts are generated repeatedly for each new program.

So I’ve just tested the target-dir global option for Cargo, which will use a single target directory for all projects. This would, in theory, prevent the constant rebuilding of WinSafe artifacts.

Since the output dir changed, I had to also change the deploy.sh scripts to point to the new location. Other than that, everything seemed to work as intended, and I’m pretty satisfied with the results.

This is now my global ~/.cargo/config.toml file:

# https://github.com/rust-lang/cargo/issues/3381#issuecomment-710388554
[net]
git-fetch-with-cli = true

# https://redd.it/1dua24f
# https://blog.rust-lang.org/2023/11/09/parallel-rustc.html
[build]
target-dir = "D:\\Stuff\\Core\\rs\\_target"
#rustflags = ["-Z", "threads=8"]
# Change default toolchain:
# rustup show
# rustup default nightly-x86_64-pc-windows-msvc
# rustup default stable-x86_64-pc-windows-msvc

As an extra benefit, when I want to clean the target directory, now I just need to delete the single _target one.

Monday, August 18, 2025

Previewing Go package documentation

While developing Windigo, I’m using the auto-generated docs at pkg.go.dev. It’s not perfect, but it’s something.

I didn’t know, however, a way to preview the generated docs while still developing the library.

Go 1.25 brought a new go doc option which allows us to preview the documentation by creating a temporary, virtual server. It downloads a whole bunch of packages, builds them, and then effectively displays the current docs:

go doc -http

This is being a game changer, I can now preview all the documentation instantly. Thanks to this guy who told me that.

Friday, August 15, 2025

Install PKCS#11 drivers, Linux

I need the PKCS#11 USB token at work, and every time I spin a new Linux VM, I need to install it again. But I never remember what needs to be done. So I’m documenting the steps here.

First, download the latest driver at GlobalSign, unzip and install it. The installation will probably fail because of missing dependencies; the second command will install them followed by the original package:

sudo dpkg -i foo.deb
sudo apt-get -f install

Once you reboot, the SafeNet icon will appear in the tray.

To install support for Brave browser, see here.

Sunday, August 10, 2025

Brave cookies whitelist

I’ve been wasting way too much time, multiple times, looking for Brave’s cookie whitelist setting. So I’ll just leave it here, for reference to my future self. I found the reference on this Reddit post.

The settings are buried in:

  • Settings
  • Privacy and security
  • Site and Shields Settings
  • Content
  • Additional content settings
  • On-device site data
  • Customized behaviors

Or, this direct link:

brave://settings/content/siteData

Monday, July 14, 2025

Goodbye Chrome

Today, Google Chrome officially disabled uBlock Origin extension. We can no longer enable it through any flags. I’ve been waiting for this moment to come for a while, and so it happened.

Today I finally uninstalled Google Chrome from my Windows computer.

Firefox is still my default browser, but I just installed Brave, which has the Chromium engine, because I have a feeling that it’s more performant than Firefox. However, I also have a feeling that Chrome itself is faster than Brave. Maybe Google has some code removed from Chromium and added only in Chrome, to intentionally make Chrome faster. Conspiracy theory, but who knows.

I used the portable version of Brave which felt strangely slow. I supposed that’s because I installed it on my D: drive, which is not SSD. Brave could not open magnet links, and so far, this new installation also cannot.

On my Android phone, I already have both Firefox and Brave. My issue with Brave is that it doesn’t support extensions, and SponsorBlock is become something I can’t live without.

Another issue is the disk space used by Chrome and Brave. My observations showed me that they top at somewhat 2.7 GB, which seems a lot. Coincidence or not, I also observed this for Firefox. My C: hard drive is running short these days, and until I buy myself a new computer, that’s all I have.

At last, I joined the bandwagon of the ex-Chrome users.

Thursday, June 26, 2025

Changing Chrome User Data location

By default, Google Chrome on Windows stores all its data in:

C:\Users\USERNAME\AppData\Local\Google\Chrome\User Data

This folder seems to top around 2.5 GB, as I tested both in Chrome and Brave.

When digging the portable version of Brave, I found that it uses the --user-data-dir command line switch to store the data somewhere else – that’s the whole point of being portable.

This command line switch, obviously, belongs to Chromium, and so to all its derivative browsers, like Chrome itself. Therefore, you can move Chrome’s User Data folder to any location. After moving the folder itself, you just have to pass the new location via the --user-data-dir command line switch, as explained in Chromium Docs:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir=D:\Stuff\ChromeUserData

This finding is also useful because it shows that the whole User Data folder can ba copied to a different computer.

I found a possible Chromium bug, however, when moving User Data to my D:\ drive. When a notification pops-up, clicking it will open another Chrome window, and this new window will point to the original User Data location. Which means native notifications are unusable.