Viruses and OSX Time Machine

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:

/Volumes/TimeMachine/Backups.backupdb/(MACHINE NAME)/(BACKUP DATETIME)/Macintosh HD/Users/(USERNAME)/...

(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.

Posted in Mac OS X | Tagged , , | Leave a comment

ISS Above installation via Mac OSX

I recently backed the ISS Above wearable project on Kickstarter, which got me thinking about (and tinkering with) my first ISS Above. What is it? Just a super-cool little widget that you can build on top of a Raspberry Pi which will notify you when the International Space Station is about to pass over your location.

ISS-Above on a Raspberry Pi, showing the ISS will soon pass almost directly over my house.

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.)
  • One of the supported display options. I’m using the PiGlow in this case.
  • An SD card writer/reader. I like the itty bitty one that AdaFruit sells.
  • The ISS-Above code. I have the HD version, which allows the Pi to show live video from the ISS.
  • Pi Filler app, from Ivan’s RasPi site. While you’re there, grab Pi Copier and Pi Finder.

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

  1. DON’T plug in the SD card/writer yet. You’ll be prompted for that in a moment.
  2. 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.
  3. 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.
  4. Insert the freshly-written SD card into your Pi, hook up your network cable, and power it up!
  5. Wait about 30 seconds for the Pi to finish booting.
  6. (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.
  7. It’ll take about a minute for the Pi to reboot and start the web server. Point your web browser
  8. Use Adafruit’s Pi Bootstrapper to install some useful software. Just run the following command on an OSX Terminal window:
    curl -SLs | bash
  9. 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.)
  10. Shut down the Pi: sudo shutdown -h -P now
  11. Plug in the wifi dongle. Be sure to leave the wired network connected for the time being.
  12. (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:
    and 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
  13. 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.
  14. 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!

Posted in Mac OS X | Tagged , , , , , , | Comments Off

Let’s Make something at Hacker Lab!

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!

Posted in Uncategorized | Leave a comment

iOS7, battery killer!

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

Posted in Uncategorized | Tagged , , , , | Leave a comment

Cranberry-satsuma relish

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.

Cranberry-satsuma relish

Continue reading

Posted in Recipes | Tagged , , , , | Leave a comment

blog software updates

Wow, I had really let this blog fall by the wayside! :(

When I started the 30-day challenge 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 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.

Some other plug-ins/features that I’d like to add are:

I’ve uploaded all of those, but I still have to activate and test them, including making sure they don’t interfere with each other!

Posted in Uncategorized | Tagged , , , | Leave a comment

Tiny Arduinos

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.)
  • Digispark supports “shields” (add-on boards) and currently offers ~20 shields.
  • Trinket is available in both 3.3V and 5V, Digistump is 5V only.
  • Digispark is smaller, but Trinket has mounting holes.

In general, I prefer the Trinket unless I need all 6 GPIO’s or the slightly smaller form factor of the Digispark. The Digispark shields can also be handy, but I only use those on workbench prototypes.

The Trinket tutorial has a wealth of information. Below are some of the things that I’m always looking up there.

  • GPIO output is 20 mA max, same as a regular Arduino.
  • I2C pins are GPIO #0 (I2C data) and GPIO #2 (I2C clock).
  • 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
Posted in Uncategorized | Tagged , , , , , | Leave a comment

Green commuting

One of my resolutions for 2014 is to make at least half of my commutes “green”, i.e. bicycling or mass transit. I live in Sacramento and work in Davis, about 40 km (25 miles) away. Amtrak offers an excellent heavy rail connection between Davis and Sacramento via the Capitol Corridor train, with trips scheduled about every 40 minutes during peak commute times. The minor problem with Amtrak (for me) is that I live about 15 km/10 miles from the Sacramento train station. I have several options to get there:

  1. Ride my motorcycle. The City of Sacramento offers free motorcycle parking at the train station, so that’s attractive. But in the time it takes me to motorcycle to the station, park, and walk out to the platform, I can ride my motorcycle all the way to Davis, (where I can also park my motorcycle for free). Riding straight to Davis is also cheaper than taking the train. But on the downside, there is some serious road rage on “The Causeway” (the stretch of freeway between Davis and Sacramento). It’s usually not too bad in the morning, but the evening commute can get pretty scary. And finally, while I get pretty decent mileage on my motorcycle, it’s not really what I’d consider a “green” commute, even if I take it to the train station. (What color do you get when you mix green and brown? Would this be an “olive drab” commute? “semi-green”?)

  2. Drive. This has nearly all the same problems as riding my motorcycle, except that it’s a bit safer. I would also have to pay for parking at the train station (or in Davis). And I get about half the fuel efficiency using my truck compared to the motorcycle. It’s also a lot more expensive, and not green at all! I’ll call this the “brown” commute.

  3. SacRT (Sacramento Regional Transit’s) bus route 29 runs practically from my doorstep to the train station, except that SacRT doesn’t coordinate either of these two scheduled buses with Amtrak’s train schedule. I need to leave home at 06:30 in order to catch the 07:40 Capitol Corridor train. Seventy minutes to cover 15 km?!? But at least it’s a green commute.

  4. Bicycle. When I’m out of shape (as is currently the case), I can make this ride in about 50 minutes, and I’ve worked out a route that lets me avoid most of the worst vehicular traffic. And I can bring my bike onto the train, so I have transportation in Davis as well. It’s about as cheap and green as you can possibly get, and still be physically present for work.

So I’ve got two green options (bicycle/bus+train), two brown options (driving or motorcycling to Davis), and one in between (motorcycle+train). I’d like to set up some kind of scoreboard for my commute, so I can track how I’m doing on my resolution. But I don’t want to do a blog post every workday and update the tally. Tedious as can be, for readers as well as me. I was thinking it might be possible to set up some sort of Twitter “listener” that could scan my tweets for these tags:


Then, as long as I tweet my commute mode every time I got to work, the tally would be updated. And really, how many Twitter users mind all these inane messages? ;)

Posted in Uncategorized | Tagged , , , , , , , , | Leave a comment

Garden expansion

The Accidental Farmer has an eye-opening post on how much to plant for one year’s worth of vegetables. The numbers are daunting, but I think they’re accurate. We already grow most of our own tomatoes and peppers, and our numbers are pretty close to these.

We definitely couldn’t do all of this ourselves. For starters, the climate and building codes here in California’s central valley aren’t conducive to root cellars, and we just don’t eat everything on this list. (Rhubarb, lima beans, I’m looking at you!) But the general idea of increasing self-sufficiency appeals to me.

I think if my wife and I try this, it would be limited to a few additional planting beds per season. Partly to save my back, since I’m the one who does the digging. But it’d also give us a chance to learn how to preserve everything, how the plants do in our climate, how much we really eat, etc.

Posted in Uncategorized | Tagged | Leave a comment

Day 4 of 30

Challenge #4 was pretty straightforward: Follow five new topics in the Reader, and begin finding blogs (and bloggers) you love. So I tried a few of my hobbies and found that these 5 gave some interesting results:

I’ll browse these topics for a few days to see which blogs are consistently getting my attention.

There were also a few failures while I was searching. I was surprised that “Maker” and “Make” returned a lot of posts which were of no interest to me. And “Sacramento” gave a grand total of 3 posts, none of which really said much about Sacramento.

Posted in Uncategorized | Tagged | Leave a comment