View keybase.md

Keybase proof

I hereby claim:

  • I am jarsen on github.
  • I am jarsen (https://keybase.io/jarsen) on keybase.
  • I have a public key ASA-ZqyUHPk5dr-lESy6TrMX4qO5hFqdGOKjBBqrP7qaqQo

To claim this, I am signing this object:

View JaSONObject.swift
import Foundation
//
// MARK: - JSONError Type
//
public enum JSONError: ErrorType, CustomStringConvertible {
case KeyNotFound(key: String)
case NullValue(key: String)
case TypeMismatch(expected: Any, actual: Any)
View StoryboardInstantiable.swift
protocol StoryboardInstantiable {
static var storyboardName: String { get }
static var storyboardIdentifier: String { get }
}
extension StoryboardInstantiable {
static func instantiateFromStoryboard() -> Self {
let storyboard = UIStoryboard(name: storyboardName, bundle: nil)
guard let vc = storyboard.instantiateViewControllerWithIdentifier(storyboardIdentifier) as? Self else {
fatalError("Instantiated view controller does not match type")
View where.swift
import UIKit
enum MyError: ErrorType {
case Oooggh(String)
}
func errorProne() throws {
throw MyError.Oooggh("nope")
}
View JaSON.swift
import Foundation
//
// MARK: - JSONError Type
//
public enum JSONError: ErrorType, CustomStringConvertible {
case KeyNotFound(key: JSONKeyType)
case NullValue(key: JSONKeyType)
case TypeMismatch(expected: Any, actual: Any)
View magiclessJarSONv3.swift
// MARK: - Keys
import Foundation
public protocol JSONKeyType {
var JSONKey: String { get }
}
extension String: JSONKeyType {
public var JSONKey: String {
View KeyboardNotifications.swift
func keyboardWillShow(notification: NSNotification) {
print("Showing keyboard")
guard let userInfo = notification.userInfo,
rectValue = userInfo[UIKeyboardFrameEndUserInfoKey] as? NSValue,
rawCurve = userInfo[UIKeyboardAnimationCurveUserInfoKey] as? UInt,
duration = userInfo[UIKeyboardAnimationDurationUserInfoKey] as? Double else {
return
}
let keyboardFrame = rectValue.CGRectValue()
View attemptMap.swift
func attemptMap<T, U>(operation: T throws -> U) -> ReactiveCocoa.Signal<T, NSError> -> ReactiveCocoa.Signal<U, NSError> {
return { signal in
return Signal { observer in
signal.observe(next: { value in
do {
sendNext(observer, try operation(value))
}
catch {
sendError(observer, error as NSError)
View Debuggable.swift
protocol Debuggable {
var debug: Bool { get set }
func debugPrint(message: String)
}
extension Debuggable {
func debugPrint(message: String) {
if debug {
print(message)
}
View PersistenceController.swift
// .-'
// '--./ / _.---.
// '-, (__..-` \
// \ . |
// `,.__. ,__.--/
// '._/_.'___.-`
import Foundation
import CoreData