This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is the minimum version number required. | |
# Update this, if you use features of a newer version | |
fastlane_version "1.41.0" | |
default_platform :ios | |
platform :ios do | |
before_all do | |
ENV["SLACK_URL"] = "https://hooks.slack.com/services/MoneyWithWings" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension String { | |
func size(withAttributes attrs: [String:AnyObject], constrainedTo box: NSSize) -> NSRect { | |
let storage = NSTextStorage(string: self) | |
let container = NSTextContainer(containerSize: NSSize(width: box.width, height: box.height)) | |
let layout = NSLayoutManager() | |
layout.addTextContainer(container) | |
storage.addLayoutManager(layout) | |
storage.addAttributes(attrs, range: NSMakeRange(0, storage.length)) | |
container.lineFragmentPadding = 0.0 | |
let _ = layout.glyphRangeForTextContainer(container) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -wKU | |
# | |
# by Kelan Champagne | |
# http://yeahrightkeller.com | |
# | |
# A script to generate a personal podcast feed, hosted on Dropbox | |
# | |
# Inspired by http://hints.macworld.com/article.php?story=20100421153627718 | |
# | |
# Simply put this, and some .mp3 or .m4a files in a sub-dir under your Dropbox |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// after http://www.cocoawithlove.com/2009/11/writing-parser-using-nsscanner-csv.html | |
import Foundation | |
extension NSScanner { | |
func scanUpToCharactersFromSet(set: NSCharacterSet) -> String? { | |
var str: NSString? | |
return self.scanUpToCharactersFromSet(set, intoString: &str) | |
? str as? String | |
: nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct URL { | |
var scheme: String? | |
var user: String? | |
var password: String? | |
var host: String? | |
var port: Int? | |
var path: String? | |
var query: String? | |
var fragment: String? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Playground - noun: a place where people can play | |
import UIKit | |
import XCPlayground | |
var str = "Hello, playground" | |
class Shape: UIView { | |
var color:UIColor | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import Foundation | |
import XCPlayground | |
XCPSetExecutionShouldContinueIndefinitely() | |
class RemoteAPI { | |
func getData(completionHandler: ((NSArray!, NSError!) -> Void)!) -> Void { | |
let url: NSURL = NSURL(string: "http://itunes.apple.com/search?term=Turistforeningen&media=software") | |
let ses = NSURLSession.sharedSession() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import XCPlayground | |
XCPSetExecutionShouldContinueIndefinitely(continueIndefinitely: true) | |
class Geocode { | |
var url : NSURL! | |
var request : NSURLRequest! | |
let queue : NSOperationQueue = NSOperationQueue() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XCPlayground | |
import UIKit | |
import QuartzCore | |
let zoom:CGFloat = 0.5 | |
let deviceSize = CGSize(width: 640*zoom, height: 1136*zoom) | |
let statusBarHeight:CGFloat = 48*zoom | |
let navBarHeight:CGFloat = 88*zoom | |
let tabBarHeight:CGFloat = 98*zoom | |
let bgColor = UIColor(white: 0, alpha: 0.01) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import XCPlayground | |
extension UIView { | |
public override func canBecomeFirstResponder() -> Bool { | |
return true | |
} | |
var firstSubview: UIView? { | |
if let f = self.subviews.first { |
NewerOlder