Apr 8 2017
Dependency Injection with Storyboards

I’d been using Swinject for a while, but was never satisfied. All I need for DI is the ability to inject into ViewControllers, including subclasses. After way too much time trying to add subclass support, it was much simpler to just write my own implementation.

read more…
Apr 8 2017
URLRequest helpers

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

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

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

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…