A few code snippets from my Xcode arsenal