Streaking

daily-streak
I’ve been on a nice publishing streak here. It all started with a food post in Iceland. After a few days in a row I decided to keep it going. When I hit 14 days I was curious how it compared historically so I wrote a little script. The code is on GitHub. Here’s the output before publishing this post.

Posts published: 6,909 since 2003-11-22

Longest streak: 78 (2009-01-26 – 2009-04-13)
Longest slump: 90 (2007-01-01 – 2007-03-30)

Currently on a 41 day streak, since 2016-11-10. Post today to keep it going!

This post did keep it going, so the streak is up to 42 days. Can I break my record? I think so.

This renewed focus on blogging has helped to fuel some new hobbies. It’s also a reminder of how blogging changed my life years ago. I started programming PHP after setting up WordPress to run this site. Eventually I was creating plugins and contributing back to WordPress, which of course led to me getting hired at Automattic. Maybe blogging can pay off for you too.

With the rise of social media, many of you have become content creators, but almost nobody owns their own content. If Facebook, Twitter, or Instagram disappear what happens to all of your words, pictures, and videos? Probably gone. If you use your own domain and push content to other services, you’re in control.

Here, I control my words. Nobody can shut this site down, run annoying ads on it, or sell it to a phone company. Nobody can tell me what I can or can’t say, and I have complete control over the way it’s displayed.

– Andy Baio

Maybe you don’t care. If you do and would like to give blogging a try, head over to get.blog. Can you match my posting streak?

Keeping Track

Maybe you’ve heard of the quantified self.  I like data and use a lot of services to keep track of various aspects of my life, so I hope you’re able to get some ideas from this list. If you have any questions, let me know.

Golf

  • Golfshot – scores, stats, and GPS.
  • golfscores.nickmomrik.com – custom site I built for 9 hole stats.
  • I also built and maintain a private site for our golf group. It has handicaps, scoring stats, and a money list.

Health

  • BTWB – CrossFit workouts. Can’t be beat for all of the data it provides.
  • Unleaded Gains – blog (name of my garage gym) where I log every workout for easy searching, categorization, and being able to keep notes about each workout.
  • RunKeeper – running stats.
  • Garmin Connect – also has running stats. My main use is for lap timing and heart rate data.
  • MyFitnessPal – when I want to track macros.
  • Withings – WiFi scale for weight and body fat.
  • Sense – sleep tracker.
  • Apple Health – brings some of these things together.

Travel

  • TripIt (Pro) – flight, lodging, and car rental details.
  • Automatic (Pro) – driving and trip information.
  • Gas Tracker – vehicle gas consumption and mileage. Automatic Pro provides this now, so I need to figure out if I can transfer the data.
  • Swarm – check-ins.

GTD

  • Apple Reminders – to-do lists, alerts, and shopping lists.
  • Bear (Pro) – where I keep ideas, notes, project or workout plans, personal documentation, etc. I also do some to-dos here, especially for lists where I don’t need/want a reminder.
  • Google Calendar – what’s going on? Where do I need to be?
  • Gmail – I actually try not to use email much.
  • Deliveries – tracks shipments.
  • 1Password – I know exactly two passwords, the one to get into my computer and the one to unlock 1Password. Everything else is a long random string of characters I access through 1P apps/extensions. I also use it to manage two-factor authentications.
  • Dropbox – file backup and sync across devices.
  • Feedly – where I read the sites/blogs I don’t want to miss.
  • WordPress.com Reader – posts from sites/blogs I don’t mind missing.

Finance

  • Wealthfront – the best managed investment services I’ve seen anywhere. They’ve been adding support for tracking outside accounts.

Other

  • Untappd – beers!
  • Timehop – neat for looking back at today’s personal history.

Home Automation

A different category worthy of a separate post. I’m still setting up my house and will post details when I have it all working.

A Wallet Update

It’s barely 10 days since my post about wallets, but I already have an update. Matt sent a Q Card Case my way. I’ve always been very anti-case for my iPhone. I don’t like the extra bulk.

I’ve never gone wrong with a product recommended by Matt, so I was willing to try it. I needed to minimize even more to make it work. No more backup credit card. If something happens to my everyday card I can use my debit. My flex spending benefits card also got left out, because I only use it every 4-5 weeks. I can’t get myself to completely part with cash, even though I rarely use it, but I cut down to a couple of twenties.

The first time I put the case on and headed out of the house I was pleasantly surprised how free I felt. Without a wallet, there was one less thing to grab and keep track of. When I arrived home I’d slip the case off because I definitely wasn’t carrying it around the house. I continued using the case each time I left the house.

I didn’t expect this outcome, but it’s here to stay. Minimizing down to a credit card, driver’s license, and debit card feels right.

Micro SD Card Imaging

I’ve been cloning micro SD cards to create backups and writing images to them during setup of Raspberry Pis a lot lately. My tool of choice has been the command line tool dd on the Mac (man page). Every tutorial referencing imaging for Raspberry Pis I’ve seen tells you to clone a drive with:

sudo dd if=/dev/disk2 of=~/Downloads/filename.img

Write an image to a drive with:

sudo dd if=~/Downloads/filename.img of=/dev/disk2

Those commands work, but are painfully slow. After firing off an image process, I came back over 3.5 hours later and it wasn’t finished! The write speed was about 0.25 MB/second.

I found a thread on the Raspberry Pi Forums discussing this. While none of the suggestions worked exactly for me, they did lead me to the solution. Here is what worked to clone a drive:

sudo dd bs=1m if=/dev/rdisk2 of=~/Downloads/filename.img

And then the opposite to write an image back to a drive:

sudo dd bs=1m if=~/Downloads/filename.img of=/dev/rdisk2

Now I got about 10 MB/second writing that image to disk and it completed in less than 7 minutes! The read speeds I’m getting are over 15 MB/second when cloning a disk. For specifics read why /dev/rdisk is so much faster than /dev/disk.

** Note: all of my examples use disk2 because that’s what I usually get on my machine. Your setup may vary. Run diskutil list to see a list of your drives and determine the correct number. You do still need to diskutil unmountDisk /dev/disk like the other tutorials mention.

I’ve actually stopped directly using dd since I started writing this post. Now I’m using ApplePi Baker, an app built on top of dd with a simple to use GUI.

I have experienced an issue using different brands of micro SD cards. Even though a couple were both 16 GB, they were slightly different sizes. Write an image file too large to a disk and no boot for you. I found rpi-clone to handle this. The next time I’m not using a headless Raspbian-lite I’ll try the built-in SD card copier, which ships with the OS.

Another app, PiBakery, looks like a neat way to automate and customize image creation, but I haven’t tried it yet.

3 MacBook Pros

My new MacBook Pro came yesterday. While not much felt different in my last laptop upgrade, I could tell this one was completely different right away. The size and weight remind me of the MacBook Air I got in 2011. The new color is fresh. Trackpad “clicks” feels familiar, maybe because of the new iPhone 7 home “button.” The […]

Hiding Password Input When Running a Remote Script

I have a simple local script, which logs into a remote server (my WordPress.com sandbox) via ssh to run a script there. After finishing, it runs another local command (unison) to pull down all of the files. The remote script is also very simple, calling svn update on several repos. If I ssh directly into the server and run the svn script, typing in passwords correctly shows up as a series of asterisks (****). Executing the same script remotely was showing the actual characters in my local terminal. Not ideal for security.

A Stack Overflow comment gave me what I needed. Wrap the ssh command with some stty commands.

stty_orig=`stty -g`
stty -echo

ssh USER@HOST './script.sh;'

stty $stty_orig

This turns off the output of the password entry completely. I never type in the password since it’s a copy/paste from 1Password, so not having the asterisks is no big deal.