Posts

Showing posts from 2021

Buying a gun in California during a pandemic

Image
December 20th, 2021, we had an intruder in the office. A homeless man who had obviously had prior experience with involuntary psychiatric hospitalization, he remained, naked, in our reception area, for almost two hours after we placed a call to 911 (he refused to leave). Our area has become - along with most of the metro area - regrettably overrun with the mentally ill homeless, who have attempted to live in our office building, have barricaded themselves in our parking structure behind dumpsters etc. to use intravenous drugs, etc., etc. Calls to 911 frequently get us nowhere, and our staff are afraid. We have a .45 in the office, but it belongs to one of the other shareholders. I decided to get my own handgun to keep at the office for self defense. Hope I never need it! Shortly after our naked intruder was escorted, handcuffed to a stretcher, to his next psychiatric ward, I went to the local gun store to see what they had that was in the range of what I wanted to spend. I could get a

Interconnected systems - the importance of a run book

I haven’t had amazing luck with hosting providers . After moving my main system over to a new host about 8 months ago , things have been running pretty smoothly, except, today I searched one of my databases for something that should have been captured, and it wasn’t there. I’ve been monitoring the  status reports generated by the automated capture process, and everything seemed fine ... Except it wasn’t capturing documents updated at the last minute, as this one was. Even though I’d coded it to do so. The culprit: The new VPS was set to eastern time, and this process was time-sensitive to a certain window local time. I tweaked the crontab entry and changed the local timezone: # timedatectl set-timezone America/Los_Angeles Problem solved, but I should have caught it earlier. Need to gather up all my random notes and documentation snippets into a runbook . The sort of thing you forget to do when you haven’t worked professionally in IT in over a decade and just dabble on your personal sys

Replacing the Thermal Paste on a GPU

Image
I have an eBay-sourced, flashed, GTX 680  (an EVGA card) in my MacPro5,1 . A while ago it started having an issue where certain black pixels would flicker red, sometimes with horizontal red lines of flickering dots starting at those pixels. (If you moved the window with the black areas around, the lines would follow.) As it got worse the longer the machine was on, I suspected it was heat related. The screen would also black out for 1-2 seconds every few minutes. Annoying! I finally carved out a half hour this morning and disassembled the card, cleaned off all the old thermal paste (first with ArctiClean 1 Thermal Paste Remover, then prepared the surfaces with ArctiClean 2 Thermal Surface Purifier, and applied a dollop of Arctic MX-5. Reassembled everything, crossed my fingers, powered it up and ... Not only did I not kill it, everything’s working perfectly now! Sweet. I used: ArctiClean kit with microfiber cleaning cloth  ($9) Arctic MX-5 Paste (2G syringe, more than enough for this j

D'oh. Logitech C270 software

I’ve had this inexpensive Logitech C270 webcam for almost a year and just realized it had software available that, among other tweaks, enables a “widescreen” mode that eliminates (well, alleviates) one of my chief complaints - perched atop my monitor, about 2' from my face, it was way too close in. It’s still a little too close, but significantly improved and usable in a pinch. (And, because Logitech has a habit of removing perfectly functional software somewhat capriciously, here’s a link to the archive.org capture of the installer package:  LogiCameraSettings_3.0.23.pkg . This same application will change the settings on the C930e and C920e cameras as well, toggling widescreen, etc.)

Quick and easy password storage with PHP

Image
Store passwords (e.g., in a database) as salted hashes, with built-in PHP functionality (using my super 3l33t system operator password ): $hash_to_store_in_db = password_hash ('god',  PASSWORD_DEFAULT); To verify a user-submitted password against the salted hash: if( password_verify ($password, $hash) ) { ... } To generate such a hash from the command line (e.g., to manually update a database table if necessary): $ echo "<?php echo password_hash('god',  PASSWORD_DEFAULT); ?>" | php Easy.

Boba U4 mini review

Image
Swapped the Boba U4 RGB 62g switches into a Keychron K8 . Holy isht, these things really are silent! Like, this is probably quieter than the rubber dome OEM Dell board our receptionist uses. Nicely tactile, though lighter than what I'm used to (daily drivers are an RK71 with Box Pinks, another K8 with Box Jades, a K6 with Box Royals, and I have a couple of Box Navy / White / Pale Blue boards I tried out while I was transitioning from buckling spring). So far, this is my GOAT. There is zero keycap wobble with this setup (stock Keychron keycaps), the “bump” is right at the top of the travel, and my typing accuracy is where I expect it to be. I’m sold. Why did it take me this long to discover and finally try these switches? One thing to note: Ali Express ships them loose in a bag, just like the switches I’ve ordered from NovelKeys etc., but for some reason it seemed like an inordinate number of these arrived with askew pins I had to gently bend back into place. I also had a tough tim

Work from Home Setup - Holiday Wireless Edition

Image
The balcony iMac has moved inside for the winter. The Labrador is, at 2 ½  years old, still not to be trusted. The combination has my dining room table sharing space between the tree and the iMac. I just set everything up to be as comfy as possible. Pictured: The  Bose QC35 II  headphones, a very competent wireless headset for calls, Zoom meetings, etc. (Though of course, now apparently superseded by the QC45 model.) Minor annoyance: After about 3 years of light-to-moderate use, the leather on the earpads is starting to flake off. I have Wicked Cushions replacements on the way.  Keychron K8 with Kailh Box Jades (swapping to Boba U4 RGB 62g switches in an RGB / Aluminum K8 , as soon as they get here). Got this monitor stand with built in USB hub and wireless phone charger on a Black Friday sale. Cheap Bluetooth laser mouse (a $20  Insignia NS-PNM3B8BK , works surprisingly well; side button functionality enabled with SensibleSideButtons ). Noble Fir 5' Xmas tree from Oregon ,

Table Tree

Image
Literal table. Literal tree. I got a 5' tree from Shawn’s this year, as I’m hosting a partial xmas (just two of us) and I don’t trust my now-2.5-year-old Labrador not to eat ornaments or lights, or otherwise interact with the tree in desirable ways, especially when I’m not home to directly supervise. Anyway. It’s next to the iMac on the dining room table, and I’ve been working on that machine a few hours a night. What’s awesome about this setup? (1) The awesome smell of the Noble Fir. (2) I have the lights on a digital timer that goes on at 4:45 p.m. every evening, and switches off at 11 p.m. nightly. The perfect reminder I should shut down and get a decent amount of sleep. (And, let’s face it, I should really be working less .)

PHP with SQLite using PDO

Image
Had to throw together a fast and dirty database-backed system. Super easy with SQLite, which is built into most PHP builds. Not sure? Run this and look for --with-sqlite3 in the Configure Command section: <?php phpinfo(); Creating a database and setting up tables from the command line is easy: $ sqlite3 SQLite version 3.22.0 2018-01-22 18:45:57 sqlite> .open /path/to/database.sqlite sqlite> CREATE TABLE tag (uuid char(36) primary key, tag varchar(255)); sqlite> .tables tag sqlite> INSERT INTO tag (uuid, tag) VALUES('371A4A0D-C21E-42AD-854A-B48181D061AD', 'Litigation'); sqlite> SELECT * FROM tag; 371A4A0D-C21E-42AD-854A-B48181D061AD|Litigation sqlite> create table article_tag( uuid text primary key, article_uuid text, tag_uuid text); sqlite> create index atart on article_tag(article_uuid); sqlite> create index attag on article_tag(tag_uuid); sqlite> .quit I realized after the fact that SQLite maps “regular” SQL data types ( CHAR(36) etc) to

LetBox kinda sucks

Image
I have a LetBox VPS instance I use for some database development. Nothing critical. It’s $3.30/month . It autobills my credit card. Easy. The credit card I had setup expired this month. I overlooked it. LetBox didn’t bother sending any notice that my card on file was about to expire or anything like that. Instead I got, the evening before a holiday weekend, two emails, one letting me know the card charge didn’t go through, the other informing me my invoice was overdue. (On the date it was due.) I got another email the next day (Thanksgiving), by which point the VPS was in a suspended state and not accessible. Really? No notice, and you’re going to suspend service when payment is a single day late over a long holiday weekend?! For a $3.30 transaction?!

Aww, shucks.

Image
After 7 years, one of the two 6TB Western Digital Red drives that forms half of my RAID1 mirror failed to come up after a server reboot: [   19.762832] ata2.00: exception Emask 0x0 SAct 0x100 SErr 0x0 action 0x0 [   19.762838] ata2.00: irq_stat 0x40000008 [   19.762841] ata2.00: failed command: READ FPDMA QUEUED [   19.762847] ata2.00: cmd 60/08:40:08:00:00/00:00:00:00:00/40 tag 8 ncq dma 4096 in                         res 41/40:00:09:00:00/00:00:00:00:00/00 Emask 0x409 (media error) <F> [   19.762850] ata2.00: status: { DRDY ERR } [   19.762852] ata2.00: error: { UNC } [   19.764196] ata2.00: configured for UDMA/133 [   19.764212] sd 3:0:0:0: [sdd] tag#8 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [   19.764215] sd 3:0:0:0: [sdd] tag#8 Sense Key : Medium Error [current] [   19.764218] sd 3:0:0:0: [sdd] tag#8 Add. Sense: Unrecovered read error - auto reallocate failed [   19.764222] sd 3:0:0:0: [sdd] tag#8 CDB: Read(16) 88 00 00 00 00 00 00 00 00 08 00 00 00 08 00 00

An Early 2020 Guide to getting a Rise of the Resistance Boarding Group at Disneyland

Image
I posted this write-up on February 15, 2020, for someone who was wondering how to maximize their Disneyland experience and chances of getting on Rise of the Resistance. Who knew what was on the horizon ?!

iPad Mechanical Keyboards - Success and Redux

Image
  I wrote earlier about trying to find a mechanical keyboard setup for an iPad . After finally retrieving my iPad Pro 9.7 from the trunk of a car that’s been in the shop since June (sigh…), I can now attest: This solution rocks. MakerMade3D’s one-off (so far?) 3D-printed “bezel” holds the iPad perfectly (with one caveat, if the feet on the K2 aren’t flipped down, small or large, the setup will rock a little bit on a flat surface. Flip those down and it’s rock solid. The setup is a Keychron K2 with Kailh Box Navy switches, which are heavy … Pondering swapping them out for Boba U4  “silent tactile” switches. (Update: Ordered from Ali Express with a delivery date about 6 weeks out, no one had the RGB 62g in stock, but I may have a line on them through reddit…) Meanwhile, two three new contenders have come to my attention: NT68 The Epomaker NT86 seems to be the perfect iPad mechanical keyboard. I’m told they’ll be shipping in December, after the Kickstarter backers’ units have shipped,

Unleaded Aviation Fuel

Image
The elephant in the room is now beating at the gates (with apologies for the mixed metaphor): The Tetra Ethyl Lead (TEL) in aviation fuel. The search for a fuel to replace the currently ubiquitous (and only fuel that can be universally used by piston aircraft) 100LL AvGas has been under way for some time. Here, I’ve attempted to summarize the current state of things, and cover the frustrating difficulties that prevent an overnight switch to unleaded fuels. Why Aviation Fuel is Leaded: Octane The first thing that must be understood when discussing replacement fuels is the octane rating. (Also, note different numbers mean different things, and it can get confusing; see below.) The main issue is detonation .   Aircraft engines with magnetos (i.e., virtually all piston-powered aircraft currently flying) are not computer controlled and have static timing that does not advance with increased RPM; additionally, mixture is manually controlled by the pilot. Automotive engines, liquid-cooled,

Excluding devices from PiHole

Image
I setup Pi-hole on a Raspberry Pi I had left over from the IIgs / Slirp days, that's since been tasked with being a VPN server (but has gobs of excess capacity). Problem: At least one Apple TV app ( WE tv ), worked for everything but actually watching a show; it would sit on a black screen with a spinning grey wheel , forever. Since it's an ad supported app, I figured (correctly, as it turns out) that Pi-hole was interfering. Excluding a device from Pi-hole's DNS-based ad blocking was a bit less straightforward than I'd anticipated, so I figured I'd write it up here. In the Pi-hole admin, expand Group Management in the left pane, and select Groups:  In this case, I created a group named AppleTV, and left it Enabled:   Then, under Group Management | Clients, for each device you want to exclude from Pi-hole, dig through the "Known clients" list to find each one and add it: Then, under the "List of configured clients," under "Group assignment,

Mounting a radar detector on a Jeep Wrangler rearview mirror

Image
Trying to mount a Uniden radar detector to the rear view mirror on an old YJ Jeep Wrangler. I got this kit initially:  AccessoryBasics Rearview Mirror Stem Radar Detector Mount . It’s mostly cheap garbage. The bolts extend an inch above the mirror (which is annoying but not fatal), and worse, the bottom adjustable piece won’t tighten enough to actually hold the detector in position, so it starts drooping immediately and only gets worse over the next few minutes. But the piece that inserts into the radar detector is fine (and metal). It also has the same “fingers” as a GoPro camera mount, so there are options. I hooked it up to a  SMALLRIG Super Clamp Mount I had handy ($15.99), via a Smatree Aluminum Tripod Mount Adapter  ($9.99); it clamps perfectly and holds the detector steady. With the cold shoe ball head piece in place it hangs about an inch below the mirror, so I’m going to try it without that piece. So far so good, though. This might be a good alternative?  Taisioner Super Clam

Shout out to TestDisk

Image
I have a ~1 year old, lightly used, Western Digital WD_Black external hard drive. It currently has two 2TB FAT32 partitions (I needed to get some footage off an embedded security camera system), only one of which was accessible. Windows couldn't fix it, various Mac systems (Lion, High Sierra, Big Sur) couldn't, either. Neither could Linux, natively. But TestDisk , running on my MacBook (Ubuntu 20.04.3 LTS), is currently recovering files off of the damaged partition, very successfully so far:  Credit where due, I found this amazing, awesome app through this answer on askubuntu.

Drop ENTR, Halo True

Image
So I got a new keyboard. I wasn’t really in the market, but I’d been sort of spec’ing in my head what I would build next, and then Drop had a significant sale price on the Entr keyboard, which I could order with Halo True switches (a Redditor’s review ), and it came with a second set of keycaps (from multiple options)... This checked all the “must have” boxes for my use case (no RGB or wireless, but this application doesn’t “require” either). So. Yeah. Here we are. I got the “silver” keyboard with the “ Vintage ” Artifact Bloom Series Keycap Set (Cherry MX profile). (The replacement keycaps aren’t backlit like the stock keys, but they’re much more stable ( one reviewer noted how “wobbly” the stock keycaps are ; that problem all but disappears with these keycaps). Of course, I created a custom Karabiner complex modifications setup . I was hoping to remap F1, F2, etc. to the F1, F2 keys, but for some reason that’s not working. Not critical, I’ll dig into that when I have more time. For

Quick and dirty de-duplication Perl script

Image
Hacked out this relatively simple Perl script ; took the backup of photos and videos from my old iPhone X from 104GB across 41,188 files, to 82G and 25,279 files. One of these days I have to build my “dedupe’d” filesystem. But today is not that day. This script is a little braindead but it worked for this purpose, where I had multiple files that looked like this: bfea8af574bedb735a089ce423eba8af: 3 files Removing: ./IMG_8963 1.JPG Removing: ./IMG_9868 1.JPG Keeping: ./IMG_9868.JPG 144d98e4b6b79e8ed3ed8baa70cca014: 2 files Keeping: ./IMG_6323 1.JPG Removing: ./IMG_6323 5.JPG

Raspberry Pi OpenVPN

Image
Now that the IIgs has an Uthernet II card, I no longer needed to have the DIN8-DB9 (“Apple IIgs, IIc+, LC III”) null modem cable / Blinken Lights GM-FTDI2-LED USB Serial Adapter / Raspberry Pi /  Slirp  setup I’d been using to connect it to the network. So, time to repurpose it as an OpenVPN server. (We’ve been running one at the office successfully for about 5 years now.) It was already setup with Raspberry Pi OS (aka   Raspbian GNU/Linux 9   (stretch)), so I kept in in place and assigned fixed IP addresses for the Ethernet and WiFi network interfaces in my DHCP server. I had to cycle both to pick up the new addresses (and I ran the command in screen so it would survive the forced disconnect, since I was doing this remotely via ssh ): # ip link set eth0 down &&  ip link set eth0 up I then updated the installed software to the latest version (10, buster); this will take a while (for my install, it was over 800 packages and almost 600MB): # vi /etc/apt/sources.list  # chang