Apr 8 2017
URLRequest helpers
Category: Programming
Tags: swift

I was working with sending REST calls to Docker via /var/run/docker.sock and needed to print out the text of the request to send via the file descriptor. This code converts a URLRequest into a CFHTTPMessage and then convert that to a string.

read more…
Apr 8 2017
Blogging Once More
Category: Personal

I’m always thinking about blogging, but I didn’t realize it had been almost 5 years since I wrote something. Hosting my own site with a generator was way too much hassle. Now that I’ve switched to Github Pages, things will be much easier and I will post more frequently.

Jul 29 2012
AirPlay on Mountain Lion Meows Instead of Roaring
Categories: Apple, Programming
Tags: AirPlay, Mountain Lion

As a developer, I was excited to see that Mountain Lion would support AirPlay. I could do all the same things from a Mac that I could from an iPad. Unfortunately, that isn’t the case. For a technical breakdown of how desktop AirPlay is implemented, read ArsTechnica article on AirPlay. Basically it uses a technology called QuickSync that is in newer Intel graphics chips. So no matter how much better your discrete chip is, you’ve got to use the weaker Intel one to mirror. Which means you won’t want to mirror Diablo 3.

read more…
Jul 18 2012
Default Defaults
Category: Programming
Tags: NSUserDefaults, preferences

One of the first things I do on starting a new AppKit or UIKit project is add a few lines of code to set default values for NSUserDefaults. You’ll never have to check to see if nil was returned from a call to NSUserDefaults once you do this.Add the following snippet to your application delegate’s finished launching method.

read more…
Jul 5 2012
MacBook Pro GPU Monitoring
Category: Computers
Tags: GPU, MacBook Pro, NetNewsWire

I just found a really great app called gfxCardStatus that works with any 2008 or later MacBook Pro. It is a menu-bar app that shows you which GPU is currently being used. Keeping it down to the Intel GPU decreases the heat generated and increases battery life.

read more…
Jul 4 2012
I love my new MacBook Pro Retina
Category: Apple
Tags: MacBook Pro, benchmarks, retina

just got my Mac Book Pro Retina and without a doubt it is the best computer I’ve every owned. My vision is pretty crappy, and I can’t make out heads or tails on a MacBook Air screen at the default resolution (glasses make no difference). But the MBP retina display is so crisp and sharp that I can even read the text from a few feet away. I had really thought I’d never be able to comfortably view a laptop screen again. I got the 2.6 GHz model with 16GB RAM and a 512GB SSD. And it is a screamer. I ran geekbench on all of my current computers, and the numbers are impressive. All the older machines have a 256GB SSD in them.

read more…
Jul 3 2012
Yojimbo syncing via Dropbox with multiple Macs
Category: Computers
Tags: Dropbox, Yojimbo

Ben Brooks wrote about the problems with using Dropbox and multiple Macs, offering a solution using Keyboard Maestro. Here is the solution I’ve been using for a while. Save the following AppleScript and set it up as a Folder Action in your Dropbox on each machine (you must do it on both machines if you want it to work both ways).

read more…