HackMake

Mac Brain: The Hardware and Software

The goal of my Mac brain project is to simplify and automate parts of computing so that the computer can take care of some of the work that my minor obsessive habits create. I’ve been using and really loving my iPad recently and want to keep using it more. One of the goals of this setup is to ease the pain that restrictions iOS has in automating work in my life. The software will do things like reliable backups, maintain a clean file structure, and download and archive documents like bank statements.

None of this is heavy work, but the set up is important for things to work in a way that I can stop thinking about it. First, let’s talk about the machine.

Hardware

I’m using a baseline refurbished Mac mini. It’s 2.3GHz i5 with 2GB of memory and a 500GB spinning hard drive. At some point, I’ll upgrade the RAM (this Mac can handle a wapping 16GB), though it’s not running memory intensive tasks at the moment. 500GB is enough space for now, since I don’t have a lot of media. Again, it being a spinning drive and not an SSD isn’t a big deal since I’m not doing my main computing on it and don’t need the I/O for fast app launching.

The machine is running headless (it’s not connected to a monitor, keyboard, or mouse) so it sits pretty and quietly on a shelf.

One of the requirements I had was that the machine would be hardwired directly into my AirPort Extreme. Wifi is getting better, but nothing compares to a hard 1Gbps connection.

The other important piece of the puzzle is the AirPort Extreme. OS X Server.app and the Extreme talk back and forth really well making configuration easy for things like port forwarding, which is necessary to get this setup running smoothly.

You don’t need this exact hardware to get your system automated, but for me, simplicity is important and the right hardware make things a lot easier.

Software

What makes this machine an outboard brain is the great software that it runs. I talked a bit about what I wanted to get done with this mini in my introduction post. Ultimately, the software I needed (or you need) depends on what exactly I wanted to get done. There were a few main jobs: move around and organize files, backup the application data that I use on my other Mac and iOS devices which can sync back to this machine, automate downloads, and backup all of my data securely.

The basic tools that handle all sort of jobs are Hazel, Lingon, Server.app, OmniFocus, Mail.app, Transmission, Evernote, iPhoto, iTunes, Skype, Backblaze, Dropbox, and Airfoil.

I’m just going to do an overview of the apps at this point and will go into more detail in the future about setting them up and explain what kind of tasks I have them do for me.

Hazel: This is one of the great OS X automation apps. It installs as a preference pane, so you know it’s always going to be running, watching folders, and waiting for whatever tasks you delegate it. The basics of Hazel is this: You tell it a folder to keep an eye on, certain parameters to watch for, like file extension, created date, or content, and then give it something to do when it finds a file that matches those parameters. Maybe you move it into another folder, delete the matching file, or run an Applescript or shell script on that file.

A lot of nerds use Hazel extensively so there are plenty of examples of Hazel actions and setups out there.

Lingon: Lingon is a GUI for the launchd and launchctl system utilities in OS X. I’ve worked directly with those services on the command line, and believe me, you want to use Lingon. It will schedule scripts or jobs that you give it to run at a specific time of day, time intervals, when something happens to a file or folder, or whenever you plug a drive in. Again, this app is incredibly flexible, and will take any job you need to schedule or run often. A couple things I have it do right now is to [backup my tweets] to a text file and generate reports from Gaug.es analytics tracking.

Server.app: This is the packaged application that sets up, configures and manages server utilities like apache, handles DNS, file serving, permissions, and all that neck beard stuff. Luckily, the GUI makes it much easier to get set up for people who aren’t familiar with managing all of these things from a CLI, though Server.app does have a command line interface. Server.app is $20 in the Mac App Store and will install as an app on Mountain Lion, rather than as an OS like previous versions of OS X Server. If you want to be running a file server or local websites for controlling your server, Server.app is the best way to admin those things.

Dropbox: Just the standard install of Dropbox. It syncs to get my files to the Mac mini, where I will back them up or have Hazel watch folders and do actions on them. I have a Drop folder within Dropbox that when I put a file in there from my iOS device, it’ll move it to an Archive folder or maybe add it into Evernote, depending on what type of file it is. Again, I’ll go more into this when I expand on Hazel.

OmniFocus and Evernote: These apps are installed with a standard configuration using my accounts to accept incoming actions or notes that are trigger from Applescripts. Once the action is automatically created based on scripts, it’ll will sync back to my other devices with it’s built in sync service.

Mail.app: For email, obviously. Mail runs with my personal email account running as IMAP, which is constantly pulling down email. The way Mail.app works, it saves downloaded emails into a system folder so when I backup my drive it also backs up all of my email. If something catastrophic were to happen to Fastmail (referral link), I would still have copies of all of my emails backed up. Mail is also running a second account with a different address which I can channel emails into for automated rules and not have to see those emails come into my other inbox. I have rules to create tasks in OmniFocus that I email to myself or to create a task like “Review Visa statement” when my bank emails me letting me know that my monthly statement is ready. Having these separate accounts, and filters on the mail server-side allows the Mac Brain to process parts of my inbox rather than me having to.

iTunes and iPhoto: Pretty self explanatory but a necessary part of the flow. I’ve got iTunes set up to automatically sync and backup my iPhone and iPad wirelessly. Right now, I have my devices backing up to iCloud, but I’m looking for a way to also have them automatically backup locally. You can do this by right-clicking on the device in the sidebar and then “Back Up”, but I want to automate this. iPhoto is open and running so it properly pulls down my Photo Stream and saves it locally since iCloud only keeps 30 days or something.

Transmission: For torrents. There’s lots of other resources if you’re looking to set this up but briefly, Transmission has a web interface you can access from the web to start downloading whatever legal stuff you’re downloading, I guess, and Hazel can move downloads to iTunes so you can access them via Home Sharing on iPad.

Skype: I have Rode Podcaster mic set up with the mini. For recording podcasts, Skype for iPad doesn’t support this mic well and requires a bunch of extra cables to make it happen. I’ve got the mic set up with Skype so I can record high-quality podcasts easily. Skype is a good reason to have your Mac hardwired. I’ve been working on a cool remote control interface for my iPad to answer incoming calls and hangup, hold, and mute active calls on my mini so that I can manage Skype running on the headless server.

Airfoil Speakers: This is a temporary thing until I get a better HiFi system set up, but it’s a cool app to turns your Mac into a set of Airplay-enabled speakers.

Backblaze: In the past couple of months, I’ve heard a couple horror stories of lost data. You do not want this to happen to you. Backblaze runs in the background to backup all of your stuff (you can exclude directories) to their cloud servers so that you have a reliable off-site backup. Their service is dead-cheap at $5 a month for unlimited storage and provide seeding options for you to mail them a drive with your stuff in case you have a slow connection and have trouble uploading all of your files. If you take away only one thing from this lengthy series, go sign up for Backblaze and worry less about losing precious data.

That’s the main tool set that runs this brain. I’ll go into more depth on each one specifically and show you the kinds of things I have them doing. For now, it would be worth downloading the apps if you don’t already have them and play around with what they can do. Get some of your own jobs set up and start automating your machine.