Rewired MacBook Pro Charger

One end of the cable on this cheap charger had worn out to the point where it would only work if held in the exact right position. Or so I thought. After a little rewiring and heat-shrink tubing I found out that it’s actually something on the inside portion of the connector. I’ll have to see if I can open up the case.

Mac Screenshot Tips

I use the Mac screenshot utility a lot, but have never thought of using it as a ruler. I’ve always used a browser extension to measure pixels on the screen. If you’re not using this utility, you initiate it by pressing command + shift + 4 on your keyboard.

I learned a few other tricks from the thread. Once you start dragging your mouse to create the rectangle:

  • Press shift to lock in an axis as you continue sizing the area.
  • Press space to move the rectangle to a new location.

Do you have any other tips?

Set Mac Volume to a Specific Percentage with an Alfred Workflow

The Touch Bar on the MacBook is a pain in the ass. I’ve been getting sick of fighting with it to adjust volume and wanted an alternative to using the icon in the Mac OS menu bar. I already had some AppleScript code I use to reset volume to start my work day, so I ran with it to make a simple Alfred Workflow.

I didn’t realize how awesome this workflow would be. I’m using it all the time, even on my other Mac, which has the keyboard volume control buttons.


Get it on GitHub.

Reload Your Mac Camera

Last month I bought some simple stickers to cover up the cameras on my laptops. My friend Ingrid bought some fancy covers at about the same time. Ever since, we’ve both been having issues with MacOS recognizing the camera when uncovered. Rebooting the Mac resolved the issue so I figured something was jacked up internally with sensors. Found a solution, but wanted to make it easier than typing in the terminal commands.

I’m an Alfred user, so I made a workflow (available on Github). Save the file and open it, which should import into Alfred. Change the keyword (default is camera) in Alfred if you want.

If you don’t use Alfred, I also made a command script you can launch instead of manually typing in the commands. It’s also on Github. Use File->Save Page in your browser. Open up a terminal window and cd to wherever you saved the reload-camera.command file. Change the execute permissions on the file by running chmod 744 reload-camera.command. Then you should be able to double-click on the file to run the script.

By the way, yes, you probably should cover up your camera, especially if you never use it.

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 keyboard can be loud, but I’ve kind of missed that from the old days. The Touch Bar looks neat, but will it be useful? The screen looks crisper. Even the hinge is noticeably smoother.

Pictured from top to bottom, these are the names reported by About This Mac:

  • 13-inch, 2016, Four Thunderbolt 3 Ports
  • Retina, 13-inch, Mid 2014
  • Retina, 13-inch, Early 2013

My First Mac Was…

The Mac turns 30 today. My first Mac was the original black MacBook in 2006 and I haven’t looked back since. What was your first Mac?

Ten years ago on the 20th anniversary, Steve Jobs said this in an interview

Like, when you make a movie, you burn a DVD and you take it to your DVD player. Someday that could happen over AirPort, so you don’t have to burn a DVD — you can just watch it right off your computer on your television set.

Now we watch movies on our TVs through Netflix or the iTunes Store with the Apple TV and don’t think twice about it. It’s exciting to think about what Apple is working on that will come out 3 or 5 years from now.