Bit Drifting
Friday, August 29, 2025
Building ffmpeg 8.0 with MP3 support on macOS Sequoia on Silicon
Thursday, May 22, 2025
Just a QR Code
Every once in a while you need to generate a QR code. You type "qr" into your address bar and hope your history still has something useful, but when it doesn't, you go ahead and google it. Reviewing the array of results, you pick the least sketchy-looking one. You enter your text, save the QR code, and quickly close the browser tab. Why so furtive?
Because you know that the site's not just randomly passionate about giving free QR codes to the world -- it's not some Johnny Appleseed of machine-vision -- someone expects to get paid. And that's why the page includes ads, it's laden with trackers, whatever you type is sent to a remote server, and it's setting all kinds of cookies on your browser. All for just a QR code.
"Isn't it possible to just make a one-page website that uses Javascript to generate QR codes? Something I could save to disk and run locally," I pondered.
Yes. Yes it is. (Spoiler, here it is.)In about 19k of HTML and Javascript (and half of that is comments and easter eggs) it does exactly what you'd expect. You type something, it makes a QR code. You can also set the size, error correction, and colors. And that's it. Just a QR code. Holy heck it works. And there is no "pro" plan.I uploaded it to my webserver for sharing. And as I looked at the URL I realized, yes, I definitely need to be paying for another single-project custom domain name. My project shall have no path in its URL! It shall be the one and true main page. After half an hour of trying to be clever, I discovered that "just a qr code" dot com was available for ten bucks. Sure, whatever. Ship it!
I present to you: justaqrcode.com
Check it out -- you can view the page source and confirm that it doesn't send anything anywhere. There are no trackers. You can save it to your local disk and run it from there. Go ahead and modify your copy to suit your own needs.
What's my payback for the domain name and hosting costs? I don't know. But I'm really annoyed at the state of the world right now and this is somehow my way of fighting back. I'll keep paying for the domain name and hosting, and you keep being awesome.
Tuesday, June 4, 2024
Building a Poetry Camera
If you've got a working Pi with a camera, here's my script. The README file has all the details on what you need to add to your Raspberry Pi base OS and how to run the script. Have fun!
Saturday, May 28, 2022
Opening the Garage with a Wave of My Hand
So here's the story. To get into my building's garage, I need to wave an rf-enabled key at a reader. Problem is that I ride, so I have gloves on. I have to stop just before the gate, take a glove off, fish the key out of my pocket, stuff it into my other glove, put the first glove back on, then ride up to the gate, scan, and ride in with it still in my glove, fully expecting it to fall out on the way.
I don't know how many commas I used enumerating that long sequence of events. Clearly too many. Something must be done. Think of the children.
So, I know that people are getting teenty-tiny rfid chips crammed into their hands. What if I could glue/sew one of those onto my gloves? (Spoiler: I ended up going a different way.) Then I could just ride up, wave my glove, and ride on in!
Step one was to try to duplicate the key at all. So I popped over to eBay and looked for a duplicator. The popular match (a blue thing from China) says it's for 125 KHz and a quick search on the interwebs indicated that my keyfob likely is one. They all come with a few blanks included, even. I found a US shipper and committed twelve dollars to the experiment.
It arrived, I tried it out (beep boop!) and the duplicate fob it made worked just fine on the garage. (And the building front door and the elevator.) I enlisted friends and made copies of their keys for them -- those also worked!
Alright, now to duplicate my key onto a teeny-tiny chip. That did not go so well. I mean, I completely got the wrong type of chip, had no idea what I needed, and utterly failed. (Though now I know exactly which one I needed.)
There's something really magical about showing people how easy it is to clone these things. Particularly because there's something really magical about how your apartment building wants to charge you a hundred bucks if you ask them for a spare copy. These things cost fifty cents, dudes! (There's a reason why land owners are the first against the wall when the revolution comes.)Back to the project though. During my research I discovered that you can actually get a ring with a chip in it! Add to cart! Ship it!
And ... success! Now when I ride, I put on my ring, and opening the garage is just a wave of my hand. Total cost of the parts (that worked) is under fifty bucks. And my friends love me because I can make them spares, too. This was a good project!