Checking ashift on existing pools

Today I found: Checking ashift on existing pools. In summary:

# zpool get all | grep ashift
# zpool get all | less
# zdb -C | grep ashift
# zdb -C | less
# zdb -U /etc/zfs/zpool.cache | less

Per ZFS 101—Understanding ZFS storage and performance you *really* want to make sure your ashift value is aligned with your disk’s sector size. ashift=9 for 512; ashift=12 for 4096; I’ve heard some SSDs can be 8K, but I haven’t been able to confirm for my own disks.

300in1 diodes

I made some notes about my 300in1 diodes. I have switching diodes, rectifier diodes, zener diodes, and germanium diodes. One thing to note is that germanium diodes are supposed to have a forward voltage of 300mV. One diode I thought was a germanium diode (it was clear with two black bands but no other markings) had a forward voltage of 600mV, I’m not sure what’s up with that, so I put it in my “unknown parts” drawer.

Arrays in PHP

Some notes about arrays in PHP over here: PHP: Frankenstein arrays. I was already aware of most of that but I thought the notes at the bottom about supporting JSON were handy:
If you want to enforce an array to encode to a JSON list (all array keys will be discarded), use:

json_encode(array_values($array));

And if you want to enforce an array to encode to a JSON object, use:

json_encode((object)$array);

Also array_is_list is available as of PHP 8.1.