- 1.5 oz Bulleit Bourbon
- 0.5 oz Captain Morgan Spiced Rum
- 0.5 oz lemon juice
- 0.5 oz maple syrup
- 0.75 oz apple cider
via http://noblexperiment.com/2012/10/20/fall-cocktail-recreate-my-apple-cider-donut/
| // | |
| // UIImage+Network.h | |
| // Fireside | |
| // | |
| // Created by Soroush Khanlou on 8/25/12. | |
| // | |
| // | |
| #import <UIKit/UIKit.h> |
| void (^block)(); | |
| if (condition) { | |
| block = ^{ | |
| NSLog(@"some code"); | |
| }; | |
| } else { | |
| block = ^{ | |
| NSLog(@"other code"); | |
| }; | |
| } |
| # requires https://github.com/originell/pycloudapp | |
| from cloudapp.cloud import Cloud | |
| import urllib | |
| mycloud = Cloud() | |
| mycloud.auth("username", "password") |
via http://noblexperiment.com/2012/10/20/fall-cocktail-recreate-my-apple-cider-donut/
| // | |
| // SKValueObject.h | |
| // TinyType | |
| // | |
| // Created by Soroush Khanlou on 5/15/14. | |
| // Copyright (c) 2014 Soroush Khanlou. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> |
| #import <Foundation/Foundation.h> | |
| @interface NSObject (IfClass) | |
| - (id)ifClass:(Class)aClass; | |
| @end |
| import UIKit | |
| extension UIColor: IntegerLiteralConvertible { | |
| class func convertFromIntegerLiteral(value: IntegerLiteralType) -> UIColor { | |
| let r = Double((value >> 16) & 0xFF) / 255; | |
| let g = Double((value >> 8) & 0xFF) / 255; | |
| let b = Double((value) & 0xFF) / 255; | |
| return UIColor(red:r, green:g, blue:b, alpha:1.0) | |
| } |
| @interface MappedArray () | |
| @property (nonatomic) NSArray *backingArray; | |
| @end | |
| @implementation MappedArray | |
| - (instancetype)initWithArray:(NSArray *)array transformationBlock:(id (^)(id object))block { | |
| self = [super init]; |
| @interface MappedArraySentinel : NSObject @end | |
| @implementation MappedArraySentinel @end | |
| @interface LazyMappedArray () | |
| @property (nonatomic) NSArray *originalArray; | |
| @property (nonatomic) NSMutableArray *backingArray; | |
| @property (nonatomic, copy) id (^block)(id); | |
| @end |
| import Foundation | |
| extension SequenceType { | |
| @warn_unused_result | |
| func any(@noescape predicate: (Self.Generator.Element) throws -> Bool) rethrows -> Bool { | |
| for element in self { | |
| let result = try predicate(element) | |
| if result { | |
| return true | |
| } |