Coding on My iPad Pro

Last month, my 9-5 job was kind enough to gift me an iPad Pro and its new keyboard. I’ve had a few iPads in the past, but they’ve always ended up stashed away, unused, in a drawer somewhere. I simply never got hooked on their utility. I never found that killer app, which, for me, would be the ability to code anywhere. This Pro model, however, has changed all of that.

I’ve always had two Macs. One to take places and another to get “real work” done. In the past that meant a spec’d out iMac and an 11″ MacBook Air. More recently, it’s been a work-issued 15″ MacBook Pro that stays plugged into my cinema display 99% of the time and a MacBook (One) when I travel. The new MacBook is certainly the most portable Mac I’ve ever owned, but it’s slow and lacks the screen space to do any UI intensive work.

Now that I have an iPad Pro, I’ve sold my MacBook and only touch my MacBook Pro when I have serious work to do. The iPad has replaced nearly everything I use my laptop for. That may not be so unbelievable. Lots of folks like Viticci have moved to an iOS only way of life. As I do more and more tasks on my phone, I’ve been tempted to try going iOS primarily, but I could never make that jump because I code for a living.

Until now.

I was screen sharing from my iPad to another machine on my local network, when it dawned on me how great it could be if this particular Mac were always available to me – even from outside my house. So, I splurged and ordered a datacenter-hosted Mac Mini from MacStadium. Ten minutes later I was connected to my new Mac in the cloud. And ten minutes after that, I had Xcode open and started testing the waters.

I’m using to connect. And with a good internet connection there’s virtually no lag when screen sharing with my new Mac Mini. I’m able to run a native Mac resolution of 1920×1200 on my iPad in full screen. That gives me plenty of room to run Xcode and the iOS Simulator. With Apple’s new external keyboard, all of my usual Xcode and OS X keyboard shortcuts work just fine. And since coding is primarily a keyboard driven activity, my arm doesn’t get tired from reaching out and touching the screen like a designer’s might.

All in all I’m thrilled with my new setup. It gives me the simplicity and benefits of iOS, while still allowing me to do real work outside of the house or from the couch.


Connecting Amazon Alexa’s Todo’s with OmniFocus

Last week Amazon Alexa and IFTTT hooked up in a big way. They now have triggers that allow you to do things whenever you add an item to your Alexa to-do or shopping lists. This is awesome because now those items don’t have to live within Amazon’s ecosystem. With a little IFTTT tinkering you can quite easily have them shuttled over the net and into OmniFocus.

This means I can be cooking dinner and literally say out-loud “Alexa, add red pepper flakes to my shopping list.” Or “Alexa, remind me to schedule a cookout with Matthew.” And the next time I open OmniFocus, those tasks will be waiting for me. Awesome.

First, you’ll need to login to your IFTTT account and activate the “Amazon Alexa” channel.

Then, create a new recipe with a trigger of “If item added to your Shopping List”.

Next, for the action, send an email to yourself with the following settings…

Screen Shot 2015-07-31 at 7.20.21 PM

Finally, in your email provider’s settings, setup a rule for any email with the body “Alexa Todo” to forward to your secret OmniSyncServer’s email address. They’ll get the email with your to-do item as the subject and add it to OmniFocus.


Don’t forget, your Alexa shopping list is separate from your Alexa to-do list. So do what we did above a second time for your to-do list to make sure you can add items to either list.


My Pebble arrived last week and I’ve been geeking out over it ever since. I’ve been thinking a lot about wearable tech the last few years and signed up immediately when Pebble was first announced last year. (I can’t wait to see what Apple can do in this space.)

So with a full week of Pebble use under my belt, I decided it was time to do something super geeky with my new smart watch. PebbleCam is the result of a few hours this afternoon tinkering around in Xcode.

In a nutshell, PebbleCam is an iPhone app that lets you use your Pebble as a remote shutter for the phone’s camera. You launch the app and it displays the camera. Prop the phone up, put it on a tripod, whatever, then get you and your friends in to frame. As long as you’re in Bluetooth range, clicking the “play/pause” button on your Pebble will snap a photo and save it to your phone’s photo library.

How does it work?

Currently, there’s no way to communicate from Pebble back to the phone except for the music control buttons. To take advantage of that, the app plays a blank MP3 file in the background and then listens for any remote control events (play, pause, next, previous) to come in via the Pebble. When a play/pause event occurs, the app snaps a photo and saves it to your phone’s photo library.

The code is fairly straightforward and is available on GitHub. Anyone in the iOS developer program can download the code and install the app on their phone. And for you jailbreakers out there, I’ve committed an .ipa file you can download

In the next update, I plan on assigning the next track button to change the camera from rear-facing to front-facing. That leaves one button left (previous track) to play with. Any ideas on what I could assign it to?

If there is enough interest, I’m not opposed to submitting the app to Apple for inclusion in the App Store. (I don’t see any reason why it wouldn’t be accepted.) However, before I do that, I’d need someone to create an icon for the app. Right now I’m using the official Pebble iOS app icon with a camera photoshopped on top.

Here’s a video of the app in action.

Search Mac and iOS Documentation From Chrome’s Omnibox

Earlier this week, the Chromium Blog announced an official extension API for Chrome’s omnibox (search bar). I’ve always loved keyboard driven interfaces — the command line, [Quicksilver](, Alfred, etc — so, I immediately started thinking about what I could build with it.

My first idea was a documentation browser for Apple’s Mac and iOS libraries. I’m always googling for class and framework names as a way to quickly jump to Apple’s documentation site. The problem is that many times the link is buried down the page, which means I waste time scanning for the link rather than just hitting return for the first search result.

This extension solves that problem by allowing you to type “ios” or “mac” followed by a keyword. It then presents and auto-completed dropdown of matching search results which take you directly to the relevant page on Apple’s documentation site. Here’s a screenshot after typing “ios UIImage”

Sample iOS Chrome Search

For those among you wondering how I’m searching the Apple docs, I caught a lucky break. Apple’s Mac and iOS reference site includes a small search box that autocompletes your queries. I tried sniffing the network traffic to see what web service they were using for suggestions (hoping to hook into that myself) but found they were showing search results without sending any data over the wire. A little more digging and I realized they were pre-fetching a dictionary of results as a giant JSON file on page load. With that data — and a sample Chrome extension courtesy of Google — it took no time at all to connect all the pieces and get the extension working.

If you’d like to install the extension, just click here for Mac and here for iOS. You’re also welcome to download and improve the code yourself from the GitHub project page.

Sosumi for Mac – Find Your iPhone From Your Deskop

Every holiday, between the food and family, I always seem to find time for a quick project. Last year I built the first version of Nottingham over the Thanksgiving break. This year was no exception, and I found myself putting the final touches on Sosumi for Mac after an eighteen hour coding streak this weekend.

Sosumi for Mac builds on the original Sosumi project I started last Summer — a PHP script that returned the location of your iPhone by scraping MobileMe’s website and that eventually evolved to use Apple’s “official” API once that was released.

Last week, Apple pushed a rather large update to the Find My iPhone service and made it free to all users. Along with that came some API changes, which broke Sosumi. With help from Andy Blyler and Michael Greb, we managed to get it working again. I took the opportunity to go all out and write a native Cocoa implementation of Sosumi as well. And, with that done, I went one step further and built a full-fledged desktop app for tracking all of your iDevices.

Now that it’s complete, it’s much easier to simply open up Sosumi for Mac, rather than having to re-login to Apple’s website or iPhone client each time. The desktop app also opens up some fun possibilities. A future version could notify you when your spouse leaves work in the afternoon so you know when to begin preparing dinner. Or alert you if your child strays from their normal route on the way home from school. Or, since Sosumi provides your device’s battery level, you could even send alerts if your phone needs to be charged soon.

Admittedly, this kind of always-on location tracking can certainly be creepy. But that’s almost always the case with these types of applications. Whether Fire Eagle, Foursquare, or Google Latitude — it’s always a matter of striking a reasonable balance between convenience and privacy. I trust you’ll use Sosumi for good rather than evil.

Download Sosumi, read more about it, or grab the source on Github and build something even cooler.

Sosumi – A MobileMe Scraper

Sosumi is a PHP script that scrapes MobileMe and exposes Apple’s Find My iPhone functionality to the command line or your own web application. This lets you pull your phone’s current location and push messages and alarms to the device.

Like my previous blog post that dealt with AT&T’s Family Map service, my goal was to connect my iPhone with Fire Eagle by Yahoo!. There are a few iPhone Fire Eagle updaters available, but they’re all limited by Apple’s third-party application restrictions. Sosumi gets around those restrictions by running every few minutes on your own server rather than the device itself. In my case, I’ve setup a cron job to run the script every fifteen minutes and push my location to Fire Eagle.

Until Apple releases a location API for MobileMe (not likely, and not their job), this will have to do.

Grab the code on GitHub.


$ssm = new Sosumi('username', 'password');
$location_data = $ssm->locate();
$ssm->sendMessage('Daisy, daisy...');

Persistant Location Updates From iPhone to Fire Eagle

Location Based Services are hot. They add an extra layer of usefulness on top of the web sites and products we’re already using. The trick is keeping your location updated in the cloud as frequently, comfortably, and securely as possible.

Fire Eagle fulfills the security requirement — brokering your whereabouts only to parties you’ve authorized. And iPhone applications like Sparrow and Voila make it a cinch to update Fire Eagle on-the-go. But they’re limited to manual updates as they can’t run in the background. (And you wouldn’t want them to because of the drain GPS has on battery life.)

For me, the holy grail has always been a way to update your location persistently from iPhone. And until Apple offers their own solution (fingers crossed) I’d like to present mine. It’s a dirty hack (the best always are), and has the added benefit of working with any AT&T phone — not just iPhone.

To do this, we’ll be scraping AT&T’s new Family Map service and then pushing the data we retrieve into Fire Eagle ourselves.

(Family Map is an overpriced add-on to your monthly plan that lets you track the phones on your account using AT&T’s website. It’s limited, but surprisingly good considering it came from within the bowels of a cellphone company.)

There will be three parts to this hack.

  1. Scraping our location data from AT&T’s website.
  2. Pushing that data to Fire Eagle.
  3. Making the script run automatically.

Let’s get started.

Scraping the Data

The Family Map website uses Microsoft’s VirtualEarth maps plus some other AJAXy fanciness. I briefly poked around to see if there were any JSON or XML data sources I could hijack but didn’t see anything. Instead, I opted to directly scrape their mobile website as it’s plain vanilla HTML.

I won’t go into the details of scraping the data (you can see the code for yourself), but it was pretty simple. Login, send a “locate my phone” request, wait for the data, and parse out our coordinates.

Pushing Data to Fire Eagle

Fire Eagle is an excellent API to work with. They’ve got a clear spec and tons of example code. The only tricky part is handling the initial OAuth setup. I’ve included a simple web page (setup.php) you can use to do the authentication. It’s based on Fire Eagle’s PHP API kit example.

Once OAuth is setup, it’s only one line of code to publish our location.

Making it Automatic

Running this script automatically will vary depending on your setup. In my case, I’ve created a cron jon that runs the included update.php script every five minutes.

Download the Code

And that’s it. This code is only a few hours old, but it seems to work well so far. I watched as Fire Eagle was updated with my location this morning on the way to work. That said, it’s definitely not user friendly — clearly something only someone familiar with a command line would want to setup. But if you’re interested in developing a friendlier solution, let me know and perhaps we can work together.

Grab the code from GitHub.

Forward Your Growl Notifications to Twitter

I’ve got three Macs that I regularly use. One at work, a laptop for personal use, and a Mac Mini connected to our living room TV. I use Growl on all three — it’s so ingrained in my workflow (IM notifications, new emails, background tasks) that I often forget it’s not a part of OS X.

Keeping track of notifications on your local machine is easy — they just appear — but for computers in another room (or timezone even) it becomes trickier. Growl has support for sending notifications over a network (I’ve written some PHP code to send them), but they don’t work beyond your LAN unless you want to mess with firewalls and changing IP addresses.

While that can work if setup correctly, it can be somewhat annoying. It doesn’t matter if you have broadband packages from o2 or any other ISP, it’ll still cause headaches in the end. Luckily, with a little help from Twitter, we can route around these problems.

For a long time I’ve wanted a way to receive Growl messages from any of my machines no matter where I am. A few months back I even created a (now aborted) fork of Growl that integrated with Amazon’s Simple Queue Service. It worked ok, but it was kludgy and not something that the average Mac user would want to spend time configuring.

Last night it dawned on me that Twitter was exactly the sort of distributed notification system that I was looking for. All I needed was a way to forward my Growl notifications to a Twitter account. (Or tweet them as all the cool kids say.) I did some Googling and found lots of people using Growl to show new tweets but nothing that would go the opposite direction.

So, I sat down and began looking through the source for Growl’s display plugin protocol. Two cans of Red Bull and four hours later, I saw my first Growl message appear in my Twitter timeline.

How Does It Work

Simple. Download this Growl plugin, unzip it, and double-click to install. You should then see a new style called “Twitter” under the “Display Options” in Growl.

Just fill in your Twitter username and password. You can also choose a prefix that will be added to the front of each tweet (@username for example).

A Few Examples

Growl is super customizable. You could set Twitter to be your default display style, but that would be too noisy. A better solution would be to set only certain apps to send notifications via Twitter — or only specific messages within those apps.

For example, I use my Mac Mini to download torrents using Transmission, which supports Growl. I configured Growl to tweet whenever a download completes.

My Mac at work does a full SuperDuper backup each night. I configured it to tweet whenever a backup fails.

Both of my parents have MacBooks. Even though we’re 3,000 miles apart, it’s still my job to keep them running smoothly. I setup nightly cron jobs on their machines which check for low disk space, pending Apple software updates, and other maintenance tasks that they might not think to check. Any problems are growled and posted to Twitter.

Final Thoughts

I’ve setup each Mac to send its Growl notifications to its own Twitter account. That keeps the notifications separate between machines. Then, I protect their updates (I don’t want strangers viewing my growl logs), and subscribe to them via my primary Twitter account. All of the tweets from each machine appear in my timeline.

And that’s when the power of Twitter really shines — because those updates are portable.

I can view them on the web, on my phone, I can subscribe to them via RSS, have them sent to my phone as SMS messages, or mix and mash them using any one of the many Twitter add-on services. You could even use Yahoo! Pipes to filter the messages.

My point is that by sending your Growl messages to Twitter, you’ve suddenly freed up a ton of data that had been stuck on your local machine and combined it into a portable format you can take anywhere.

Thanks to Matt Gemmell for MGTwitterEngine which does the Twitter heavy lifting in this plugin.


Download Growl Twitter.

How to Stream Your iTunes Music Over the Internet

Update: Want to stream your iTunes music over the internet? Try Highwire! It streams your iTunes library and a whole lot more :-)

I keep all of my iTunes music stored on a Drobo attached to an Airport at home. This frees up valuable space on my laptop and lets me listen to it via Front Row on my TV as well. It’s a much more convenient solution all around.

The only problem is that I lose access to my music when I’m on the road or at work. I’ve seen other services or 3rd party apps that let you stream your music online. They work well enough, but I’ve always thought it silly to pay for a feature that iTunes used to have. In honor of iTunes’ new 8.0 release this morning, here’s my simple workaround.

First off, you’ll need a Mac at home with iTunes open that is always connected to the net. In my case, that’s a Mac Mini in our living room. It also needs to have “Remote Login” (ssh) enabled in System Preferences → Sharing.

Then, poke a hole in your router’s firewall to that machine on TCP port 3689. Here’s a screenshot of my router’s settings:

(Note: your computer’s IP address might be different than mine.)

Then, with that done, anytime you want to listen to your music elsewhere, run these two commands in Terminal on the Mac you’re listening with — not your Mac at home.

ssh your_username@your-home-ip-address -N -f -L 3689:your-home-ip-address:3689

That creates a tunnel from port 3689 on your local machine to port 3689 on your Mac at home. (That’s why you needed to open the hole in your firewall.)

mDNSProxyResponderPosix squeal "My Music" _daap._tcp. 3689 &

That creates an iTunes Bonjour broadcast notification locally which points back to your Mac at home. In other words, it tricks your copy of iTunes into thinking there’s a Mac nearby sharing its iTunes library. When iTunes tries to connect, the traffic is automatically rerouted to your other Mac.

Sidenote: if you don’t have the mDNSProxyResponderPosix command installed on your Mac, I have download links at the bottom of this post.

So that’s it. No need for third party software. When you open iTunes, you should see your music library appear in the “Shared” section of the sidebar. (Much to my excitement, the newly announced Genius playlists appear as well!) You can close the Terminal window once you’ve connected to your music library. (The mDNSProxyResponder command needs to stay active until then.)

Making it Better

To speed things up a bit, I’d put those two command into a shell script and place it in your ~/Library/Scripts folder. I call mine music-tunnel. That way, you can run that one command and have everything up and running automatically.

Or, if you’re feeling adventurous, you could wrap the whole thing inside a simple Cocoa app with a nice On / Off button. But that’s a project for another day…

Downloading mDNSProxyResponderPosix

Here’s a binary download of the mDNSProxyResponderPosix command for Intel. Place it somewhere in your path. And here’s the source if you’d like to compile it yourself for PowerPC.