This guy, Cathode Ray Dude [CRD], does some fun stuff. He’s on the web via HTTPS at gekk.info and HTTP at www.cathoderaydude.com.
Category Archives: Software
Game on!
I was at the thrift store the other day and I found this retro gaming system for AU$15 (US$10). Haven’t had a play with it yet, I’m saving it for when I have some time to do the unboxing. And I didn’t want to do that until I had my new HDMI recording setup installed, but that’s done now, so I AM READY BABY.
Saturn PCB Design Toolkit
Today while watching EEVblog 1559 – PCB Design: Trace Current Rating I learned about the Saturn PCB Design Toolkit.
ChatGPT formats date/time in PHP
I asked ChatGPT to format php datetime as “Fri 24 Mar 2023” and it “understood” what I meant and gave me the answer that I wanted! If that’s not intelligence I don’t know what is…
Server programming challenge
This looks like fun: protohackers.com. If I had more time I would definitely do this. If… :P
The 1969 Apollo Guidance Computer
Here’s a great talk about the Apollo Guidance Computer: Light Years Ahead | The 1969 Apollo Guidance Computer.
CRC
I watched Ben Eater’s videos How do CRCs work? and Checksums and Hamming distance (the full course is Learn about error detection) then found the Wikipedia page: Cyclic redundancy check.
Also of interest:
Amphetamine
I wanted to know how to stop my MacBook Pro from going to sleep when I closed its lid, so I asked ChatGPT and discovered Amphetamine. Good work, Internet; you have come a long way since the nineties.
p.s. I always wanted to blog about amphetamines.
Data corruption
Oh, yuck. ZFS-8000-8A. :(
------------------- Mon May 29 16:23:47 [bash:5.2.15 jobs:0 error:0 time:35] root@charm:/home/jj5 # zpool status -v pool: fast state: ONLINE status: One or more devices has experienced an error resulting in data corruption. Applications may be affected. action: Restore the file in question if possible. Otherwise restore the entire pool from backup. see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-8A config: NAME STATE READ WRITE CKSUM fast ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 nvme-Samsung_SSD_990_PRO_2TB_S6Z2NJ0W215171W ONLINE 0 0 2 nvme-Samsung_SSD_990_PRO_2TB_S6Z2NJ0W215164J ONLINE 0 0 2 errors: Permanent errors have been detected in the following files: /fast/vbox/218-jj-wrk-8-charm-prod-vbox/218-jj-wrk-8-charm-prod-vbox.vdi -------------------
Target then source
I’m surprised it took me this long to figure this out. But there’s a very big problem with a command like this:
rsync var/data/ target:/var/data/
The problem is that in order to type that command, you first have to type the first part of the command, which includes this command:
rsync var/data/ target:/
That first part of the command is in fact a valid command, and if you pressed ENTER accidentally before you had finished typing the whole command, then rsync would begin to replace your entire root file system with the contents of var. That’s the sort of thing that will ruin your day.
So from now on, when I write command-line tools, I will nominate the target *before* the source, and if both the target and source are not specified then I will return an error.
p.s. Yes, the reverse problem exists, that when you nominate the target first you can still fuck up with the source, but given that you are operating on the target from the source, if you get the source wrong, you can just fix your command and run it again and it will be fixed up.