Posts

Showing posts from January, 2022

Time Machine on a Samba or NFS server

Image
Want to back up my MacBook Air to the NAS, which is running NFS and Samba. The existing guides I found weren’t complete. I ham-fisted my way to a solution that seems to be working. This is on High Sierra, the most recent operating system this old laptop will officially run. (Since verified to also work as far back as Lion.) I skipped using the graphical Disk Utility to setup the sparsebundle, and created it from the command line (in this case, 300GB to back up a 240GB internal SSD): $ sudo hdiutil create -size 300g -type SPARSEBUNDLE \ -nospotlight -volname " MBA2012TM " -fs "Case-sensitive Journaled HFS+" \ -verbose /Volumes/ nas / Time\ Machine / MacBook-Air-2012_TM .sparsebundle Then I mounted the disk image: $ open  /Volumes/ nas / Time\ Machine / MacBook-Air-2012_TM .sparsebundle Then I tagged it as a Time Machine eligible drive: $ sudo tmutil setdestination -a /Volumes/ MBA2012TM / # Under 10.7, omit the '-a' And then went into the Time Machine cont

Ten Second Guide to PHPUnit

Installing PHPUnit Downloading Directly $ wget https://phar.phpunit.de/phpunit-6.5.phar $ chmod +x phpunit-6.5.phar $ sudo mv phpunit-6.5.phar /usr/local/bin/ $ sudo ln -s /usr/local/bin/phpunit-6.5.phar /usr/local/bin/phpunit $ phpunit --version PHPUnit 6.5.14 by Sebastian Bergmann and contributors. Using Composer $ composer require --dev phpunit/phpunit ^6.5 $ vendor/phpunit/phpunit/phpunit --version Create Tests To test, in this example, the Calendar class, create a CalendarTest class with at least one function with a name starting with ‘ test ’: <?php require "Calendar.php"; use PHPUnit\Framework\TestCase; class CalendarTest extends TestCase {    // Tests must be written in a public functions with a name starting with test    public function testDayOfWeek() {                  $c = Calendar::parse("2019-10-01");         $c->setWeekdayInMonth( Calendar::THURSDAY, 3);         $this->assertEquals('2019-10-17', $c->toString('Y-m-d'));   

Getting Bluetooth 4.0 Working on an Old MacBook

Image
Okay, so, I have this working - not 100% seamlessly and not quite as it should, but it does work. I had do download Bluetooth Explorer for Mac OS 10.7 (linked from the Hideez documentation ), and go into Utilities → HCI Controller Selection and manually specify the Cambridge Radio device: Once that was done, I could go into the Bluetooth Setup Assistant and pair the Air 75 with the MacBook as normal (hold down Fn-1, Fn-2, or Fn-3 to select a Bluetooth profile; the left side light will blink blue when the keyboard is ready to connect, and the blinking will be faster when it’s ready to pair). A stumbling block: I’ve punched in the below terminal command multiple times and the switch to the USB Bluetooth adapter never “sticks” across reboots. Option-clicking the Bluetooth menu item shows the address 00-1B-63-47-6A-4D, which comes up as an Apple device when I search . After I switch using Bluetooth Explorer, it lists 00-1A-7D-DA-71-03, which shows up as “cyber-blue(HK)Ltd.” $ sudo nvram bl

The ultimate lap desk setup.

Image
I’ve been trying to find a good “kick back on the sofa with the dogs and still get work done” solution that doesn’t kill my back, neck, etc. I think I may have found it: Any Mac laptop (or any laptop, really) with a compatible keyboard (basically, anything with the chiclet keyboard made between 2006 and, as I understand it, 2019 - I’ve used it successfully now with 2020-era Intel MacBook Air laptops, too). In this instance I’m using a Mid-2007 MacBook Core 2 Duo. NuPhy Air 75 keyboard . I’m using one with “brown” switches, via Bluetooth. It’s designed specifically to sit on top of the laptop keyboard and not interfere, and is a much nicer typing experience than the built-in keyboard, especially the ancient MacBook keyboard, which wasn’t amazing to begin with and has gotten mushy over time. (This Mac required an aftermarket Bluetooth 4.0 adapter to work with the NuPhy keyboard. It’s kind of a kludge but it worked. The bundled 2.4 GHz NuPhy dongle is another option, or you can connect i

A tale of three portable keyboards

Image
Epomaker NT68 First, the one I was the most excited about, the Epomaker NT68. This one isn’t low profile, and uses standard MX style switches (which can be hot swapped). The one I ordered came with Epomaker’s Chocolate Rose switches, which have a nice feel to them - nicely tactile, with the bump at the very top. But they’re loud - thoccy - and not the best choice for a portable board I’ll want to use anywhere. So I’m going to swap it to Boba U4 switches. Anyway. My two gripes: It took me a minute to figure out how to fold the case to support an iPad (and even then, the 9.7 Pro can best be used only in landscape mode; portrait mode is usable but not very stable), and, the backlighting, in addition to being a battery drain, is aesthetic only; the keycaps (which use the relatively rare DSA profile) are Properly folded, the NT68 case supports an iPad not shine-through, so the back lighting doesn’t really help with low light usability. (At least one review suggests that Cherry p

More dog stuff: The GOAT Treat Pouch, a truly impressive tiny flashlight, and Action Plush toys

Image
I go through treat pouches way too fast. So far, this seems to be the best one yet: Paw Lifestyles – Dog Treat Training Pouch . I like the firmly attached, substantial, clip. It also comes with a belt, and a shoulder strap, etc. Probably too many pockets etc. for my purposes. Stays open (somewhat rigid), makes going in for a treat easy. This light is amazing: Streamlight 73303 325 Lumen Pocket Mate Keychain/Clip-on USB Rechargeable Flashlight . It’s tiny . It clips to the treat training pouch I mention above. It’s brighter than the trusty Motorola MR500 I’ve been using , and it’s rechargeable (I’ve been using rechargeable AAs (AAAs, I could have sworn; I’ll check when I get home) in the Motorola; this is more convenient). Finally: A coworker got my dogs a GoDog Action Plush! snowman. They love it. The legs kick out as they bite down. I hesitate to think what sorts of behaviors that’s rewarding. Meanwhile, I highly recommend the toys, at least so far. I’m going to pick up a pheasant .