Skip to content

Instantly share code, notes, and snippets.

View vladak's full-sized avatar

Vladimir Kotal vladak

  • Europe
View GitHub Profile
@vladak
vladak / WD-passport-studio.md
Last active August 19, 2026 20:52
WD My Passport Studio FW

My Passport Studio

I bought the My Passport Studio external hard drive on eBay in 2024 to provide Time machine backup to my old mac mini. Specifically I wanted something that can be connected over Firewire, to save the USB ports on the mac mini. This worked well until one day the drive died - performed I/O really slowly and made classical clicking sounds of stuck/failed hard drive head.

The disassembly of the enclosure is easy, just a bunch of screws. It is a nice enclosure, all alluminium. Replacing the internal drive with Samsung EVO SATA SSD yielded nothing - the drive was not detected. I tried bunch of other drives, esp. classic 2.5" 5400 RPM drive (from Seagate), however none worked.

When a spinning-rust drive is connected to the board, it will start spinning, so there is definitely power being passed to it, however it does not get detected. This is what Linux says:

[11948.216367] usb 1-1: new high-speed USB device number 5 using ehci-pci
@vladak
vladak / tailscale-dns-quad100-vs-global-dns.md
Last active July 11, 2026 14:22
Tailscale DNS resolution might actually be affected by ACLs

Tailscale: Quad100 vs. ACLs/grants

Consider the following Tailscale grant:

{
	"grants": [
		{
			"src": ["tag:foo"],
			"dst": ["tag:bar"],
 "ip": ["*"],
@vladak
vladak / openbsd-apu.md
Last active July 5, 2026 20:06
OpenBSD APU notes

OpenBSD APU notes

Install

serial console setup

@vladak
vladak / xstream.md
Last active February 11, 2026 15:51
xstream-1_4_21
@vladak
vladak / macmini-mid2011-eGPU.md
Last active November 18, 2025 21:50
macMini 2012 + eGPU

mac mini mid-2011 with eGPU

These are my notes on running mac mini mid-2011 with macOS HighSierra 10.13.6 with eGPU.

Hardware

original:

  • mac mini mid-2011
    • Intel Core i5 2,3 GHz
  • 16 GB DDR3 RAM
@vladak
vladak / rust-gotchas.md
Last active December 19, 2025 17:20
Rust gotchas

Learning Rust gotchas

That is, learning from C99.

Basics

  • by default variables are constant. To make a variable mutable, it has to have the mut keyword:
    • otherwise it would not compile
@vladak
vladak / jetkvm-dc-on.md
Last active July 23, 2026 11:47
JetKVM DC extension power on by default
@vladak
vladak / LG-DualUp.md
Last active April 10, 2025 11:23
LG DualUp notes
@vladak
vladak / macos-home-end.md
Last active August 16, 2025 18:19
home/end macOS key bindings

For the home/end keys to work on external USB keyboard in macOS, it is necessary to set key bindings like so:

mkdir ~/Library/KeyBindings && touch ~/Library/KeyBindings/DefaultKeyBinding.dict
cat << EOF > ~/Library/KeyBindings/DefaultKeyBinding.dict
{
  "\UF729"  = moveToBeginningOfParagraph:; // home
  "\UF72B"  = moveToEndOfParagraph:; // end
  "$\UF729" = moveToBeginningOfParagraphAndModifySelection:; // shift-home
  "$\UF72B" = moveToEndOfParagraphAndModifySelection:; // shift-end
 "^\UF729" = moveToBeginningOfDocument:; // ctrl-home
@vladak
vladak / java-URL.md
Last active April 1, 2025 07:15
java URL constructor deprecation

context: JDK 21 support: oracle/opengrok#4459

existing PR from Lubos contains some of the changes: oracle/opengrok#4570

Specifically, all the URL() constructors are being deprecated in Java 21: https://docs.oracle.com/en/java/javase/21/docs/api//java.base/java/net/URL.html. The only way to get URL object is to create URI object first and then use toURL() method to convert it (the URL.of() static method requires URI argument).

Fun fact: URL can establish connection to the target using the openConnection() method (even via proxy).

My note: oracle/opengrok#4570 (comment):

I took a longer look at the departure from the URL() constructors yesterday. The URL class by itself does not support any encoding/decoding, it merely breaks down the URL into pieces. The encoding is then supplied by the URI class.