I picked up a copy of Learning Puppet 4 shortly after publication and went through some of the examples and exercises. Pretty straightforward, although there were a few glitches in the examples, as is typical with any fast-moving technology. The book’s errata addressed all of these, as far as I recall.

So now it’s about two years later, and I wanted to revisit the learning environment. Of course there have been updates to just about everything, so my first task was updating VirtualBox, Vagrant, Xcode (I’m on a Mac), the learning repository, and the vagrant plugin. After going through all that, I tried to start up the first client VM:

Just before I ran vagrant up, I had been re-reading the book’s section on the vbguest plugin, and I got fixated on this:

In particular, this plugin helps avoid problems that happen when a new kernel is installed, such as the /vagrant shared mount not being available.

So I thought vbguest might be the cause of my problem. (Hint: it wasn’t!) I spent an inordinate amount of time deleting and re-installing everything, multiple times. When I finally hit upon the obvious idea of copy/pasting that very long rsync command into a terminal window, I quickly zeroed in on the underlying issue: my ~/.ssh/config file’s default settings will only work with the servers I manage for my employer. (Settings which I implemented after I had originally set up my ‘Learning Puppet 4’ environment.) I’m not going to go over the details, but as soon as I suspected that this might be the problem, it was pretty easy to verify:

I’ve restored my original ssh config file, with a new Host section for the learning environment’s virtual machine. I may need to add more Hosts for the other VM’s, but hopefully I’ll remember to check here for hints if I run into this issue again.

The ssh options that I find most useful for diagnosing problems are -v (or -vv or -vvv) for verbose protocol status while initiating and breaking a connection, and -G which causes ssh to print its configuration after evaluating Host and Match blocks. To enter these options as part of a vagrant ssh connection, specify them after the target like so:

Last year my wife bought me a countertop coffee roaster, and I’ve been hooked on home-roasting coffee ever since. Lately I’ve also been roasting in our convection open, which works great for medium- to medium-dark roast. (I use the countertop roaster for light- to medium-roasted coffee.)

Here’s a typical oven roasting session. Prep the house by opening several windows, because this will generate quite a bit of smoke! I pre-heat the convection oven to 500 °F (260 °C), the max for our oven. I also have some baking stones in there to help maintain an even temperature.

Put the loaded roasting pan into the oven, and listen for “first crack” (when the first coffee bean audibly pops open). Usually that’ll be about 5:00 minutes for me. About a minute later, it’s time to rotate the pan–this helps the coffee roast more evenly.

Ten minutes or so into the roasting process, I’ll start to see a bit of smoke coming from the oven. At that point, it’s time to start checking the coffee every minute or so. I pull the pan out of the oven just before I think the beans look “done”, because they’ll keep roasting a bit more from their internal heat. I pulled this batch out after 11-12 minutes. (I forgot to check the time.)

Now comes the hardest part: getting the 500-degree coffee beans from the pan into a colander. Then I take this and another colander outside, and pour the beans from one colander into the other. This helps the beans air-cool quickly, and also releases most of the chaff. Once the beans are cool enough to touch, I put them into a vented container and let them cool completely.

I haven’t been using my blog lately because I’ve been trying to find a reasonably-priced service that offers encrypted web connections, i.e. https://example.com. A few weeks ago my current hosting provider, Pair, started offering that as a free service. Woot! I’ve now got that set up, including a permanent redirect from http->https. I found redirect-checker to be pretty helpful in validating my redirect rules.

I’ve spent some time upgrading my site, which unfortunately broke some of my plugins. I switched to a new recipe plugin, WP Recipe Maker. But I haven’t found a way to use the free version of this tool to import my old recipes automatically. I’ll probably just go through my recipes and reformat them manually. Sounds tedious, but it’ll be a good opportunity to look through them all again.

Another plugin that broke was my markdown formatter. This has left a bunch of raw markdown in some of my posts, but that’s pretty easy to fix. one. post. at. a. time. le sigh

Argh! I did a full scan of my Mac and discovered a virus on the Time Machine volume. I wrote about this a few years ago, and the tweaks to my mail/anti-virus/Time Machine work flow have served me well. But I guess a virus slipped through the cracks somehow, and it’s kind of a pain to eradicate an infected file within the Time Machine software — First problem is the viruses are normally attachments, which are stored within the ~/Library folder, which is normally hidden. Second issue is the Time Machine interface, which (as far as I know) precludes using Spaces and app switching. And finally, the mail attachments are buried deep within the directory tree with somewhat meaningless path names. But it finally occurred to me to copy the offending path from the antivirus log file then go into Time Machine and paste it into the search bar. After that, it’s just a matter of scrolling back in time until you find the most recent backup with the infected file. If the file is from a really old TM backup, just take a look at the backup date/time in the path from the antivirus log to home in on it within Time Machine.

I’m using the free Sophos antivirus software. To open the log (after doing a virus scan), go to the menu and select Scan -> View Scan Log. The infected file(s) should be listed at the end of the log. For infections that are only on the Time Machine volume, the path will look like this:

(Assuming you didn’t rename either the TimeMachine or ‘Macintosh HD’ volume names.) Copy the elements of the path following your username. Then start the Time Machine app. Go to the search bar (top right of the TM Finder window) and enter ‘~/’ and paste in the path you copied from the antivirus log. Scroll back to a backup in which that file exists. (You can zoom in on the correct time frame based on the date/time shown in the full path from the antivirus log.) Once you find any copy of the file in Time Machine, select the “Delete all copies of Such-and-Such file” from the action menu.

Unfortunately, when I tried to update my ISS Above, I wasn’t able to successfully write to the old SD card in my RasPi. Not the first SD card that I’ve roached, and I have most of the data from the old card. So I thought I would take this problem opportunity to write up the steps I use to [re-]build an ISS Above gizmo using my Mac.

Items needed:

Raspberry Pi computer, complete with 8 GB SD card, power, and case. As far as I know, any model of RasPi will work.

Wired network connection, at least during setup. (I’ll show how to migrate it to wifi below.)

Steps (edited–one of the Bootstrapper packages seems to be interfering with ISS-Above):

DON’T plug in the SD card/writer yet. You’ll be prompted for that in a moment.

Get the ISS Above image (unzipped) onto the Mac. I had trouble unzipping on OSX, so instead of fixing whatever the problem was, I took the easy way out and unzipped on a PC.

Launch the Pi Filler app to write the ISS Above image to an 8 GB SD card. It will prompt you for your ISS Above image file, (e.g. ~/Downloads/issaboveV2015-10-02-14-MASTER.img), and tell you when to insert the SD card/writer. This will take a while, possibly up to half an hour depending on all of your hardware. It took about 10 minutes on my system. I’m pretty sure the Pi Filler unmounts the SD card when finished.

Insert the freshly-written SD card into your Pi, hook up your network cable, and power it up!

Wait about 30 seconds for the Pi to finish booting.

(Optional — If you don’t know how to set up DHCP addresses on your network, skip this step.) Fire up Ivan’s Pi Finder app. This has a handy “Copy MAC address” button. Configure your new wired DHCP address (and restart the DHCP server if necessary), then reboot your Pi to pick up the new address.

It’ll take about a minute for the Pi to reboot and start the web server. Point your web browser

Use Adafruit’s Pi Bootstrapper to install some useful software. Just run the following command on an OSX Terminal window: curl -SLs https://apt.adafruit.com/bootstrap | bash

Bootstrapper took about 10 minutes on my system. Once that was done, I logged in via ssh (using Pi Finder again) to edit /boot/occidentalis.txt and set up my hostname and wifi credentials. (I could also have done this in advance, but I didn’t have the wifi password handy at the time.)

Shut down the Pi: sudo shutdown -h -P now

Plug in the wifi dongle. Be sure to leave the wired network connected for the time being.

(Another optional step.) Power up the Pi, wait 30 seconds, and use Pi Finder to log in again. (I should have done this on the earlier ssh connection, but I wasn’t thinking about it at the time.) Get the MAC address for the wifi interface. I used: ifconfigand set up another DHCP address for the Pi-wifi MAC address from the wlan interface. Shut down the Pi again: sudo shutdown -h -P now

Set up the new ISS-Above appliance where you’d like it to live. Ideally, this will be some place where the Pi itself is visible (so people will notice the blinking PiGlow), with an HDMI display within reach for a graphical display.

Power it up and wait for the ISS to pass overhead!

I’ve got this up and running for now, but there are some things I’d like to fix. For one thing, the instructions above could be more streamlined. (I just wrote everything down as I did it.) Also, I haven’t got the live feed from the ISS set up. But those tweaks can be done later. Right now, I’m going to keep an eye on the next pass of the ISS, practically right over my house!

Earlier this month I became one of the Facilitators at Hacker Lab in Sacramento.
As such, I’ll be working in the Maker Space once or twice a week, helping users with the plethora of tools and equipment they have available.

One of the first tasks assigned to new Facilitators is writing up a short bio.
So of course I headed straight for my blog and put up my Facilitator page. 😉

Currently I’m working every Wednesday evening, after I finish my day job.
I also plan to work a shift every 2-3 weekends starting next month.
Come on out to Midtown (I Street at 17th), and let’s Make something at Hacker Lab!

I finally upgraded my iPhone 4S to iOS7 the other day, plugged in my charger that night, and started the day with a shiny new OS. But in less than an hour, my battery was dead. WTH?!?Continue reading →

The 2012 Thanksgiving issue of Bon Appétit had a cranberry-orange-mint relish recipe that looked pretty good, except that my wife can’t stand mint. So I left out the mint, substituted satsumas for the oranges, and used star thistle honey instead of sugar. I like to let this sit in the refrigerator overnight to allow all the flavors to meld. It makes a refreshingly tart complement to many meals, not just Thanksgiving.

When I started the [30-day challenge][zero-to-hero] earlier this month, I knew one of the urgent things that needed to be done was a full update of the blog software, theme, and plug-ins. I finally got it done! WordPress is up-to-date, along with the [twentyten][] theme and all my active plug-ins. I also took this opportunity to delete old themes and plug-ins that are obsolete, stale, or unlikely to be used.

When I updated the twentyten theme, I was expecting to see a widget for images in my admin panel. After all, the Zero-to-Hero post links to an [image widget][] page which makes it seem like that’s a regular feature. Or maybe it’s only applicable to a [wordpress.com][] hosted site? Anyway, I wanted to add a zero-to-hero badge/widget, and since there doesn’t seem to be one built in I’m trying out [Image-widget][] and [Simple-image-widget][].

I’ve been playing with Arduino boards for the past year or two. These were designed as micro controllers for the masses — easy to program and simple to wire up. You need only the most rudimentary computer and electronics skills to get started playing with these excellent boards. They’re also relatively inexpensive. You can get an Arduino Uno board, (the most commonly mentioned Arduino in 2013), for about US$30.

But if you decide to start using these for real, i.e. deploying a prototype permanently or long-term, suddenly “relatively cheap” may not be quite as inexpensive as you’d like. Thirty bucks is reasonable for something that sits on your workbench, but that’s kind of expensive if you want to use a handful of them to monitor the temperature throughout your house: $30 x 5 is $150, which suddenly isn’t looking inexpensive at all.

There are cheaper alternatives, especially if all you need is a few I/O pins. The two that I’ve been playing with lately are Digistump’s Digispark and Adafruit’s Trinket. Both of these are priced under US$10 and use the ATtiny85 micro controller chip, the diminutive little brother of the chip in a regular Arduino.

Main differences between these two boards:

Trinket is a bit cheaper (about $1) than Digispark.

Digispark exposes all 6 GPIO pins, whereas Trinket has 5.

Trinket has a RESET switch. (You “reset” the Digispark via power cycling.)

USB communication uses pins #3 and #4. Hardware on these pins can interfere with the USB interface, e.g. reprogramming the Trinket. So it’s a good idea to provide some sort of disconnect ability if you use either of these two pins.

PWM output available on pins #0, #1, and #4.

ADC (analog input) pins are GPIO #2, #3, and #4. Keep in mind that the GPIO/digital pin numbers are ”’not”’ the same as the analog inputs! The printed labels on the Trinket are the ”digital” pin numbers.

GPIO/digital #2 is analog (ADC channel) 1

GPIO/digital #3 is analog (ADC channel) 3

GPIO/digital #4 is analog (ADC channel) 2 — Yes, the analog numbers are out of order