Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
#
# This script can be used to check the in-store availability of the iPhone 5S.
# By default, it searches for all AT&T models. You can change this by editing
# the MY_DEVICES array below. While the Apple API supports searching for
# multiple devices at once, there is a limit.
#
# Once you have properly configured the MY_DEVICES array, you can run this script
# from the terminal. It takes a single parameter, which should be the zip code you
# wish to use for your search.
@bencochran
bencochran / MonolithViewController.swift
Last active September 12, 2015 04:45 — forked from asmallteapot/MonolithViewController.swift
Handling storyboard segues with enumerations in Swift
class MonolithViewController: UIViewController {
enum InnerSegueType: String {
case WebView
case Inspector
case Gadget = "SomeNameMismatch"
}
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
guard let identifier = segue.identifier,
let segueType = InnerSegueType(rawValue: identifier) else {