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
class App.Root extends Spine.Stack | |
controllers: | |
resources: App.Resources | |
users: App.Users | |
routes: | |
'/resources' : 'resources' | |
'/users' : 'users' | |
default: 'users' |
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
//MARK: examples | |
extension JSONValue { | |
static func url(value: JSONType) -> JSONResult<NSURL> { | |
return cast(value).map({NSURL(string: $0)}) | |
} | |
} | |
extension JSONValue { |
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
enum DataSourceState<D,E> { | |
case Empty | |
case Loading(Box<D?>) | |
case Ready(Box<D>) | |
case Error(Box<E>,Box<D?>) | |
func toLoading() -> DataSourceState { | |
switch self { | |
case .Ready(let oldData): | |
let value: D? = oldData.value |
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
{"app_name":"TransIP","app_version":"","bundleID":"nl.transip.TransIP","adam_id":325181784,"os_version":"iPhone OS 8.1.3 (12B466)","slice_uuid":"0d9c547d-3c8d-3eb0-b948-c1b5b26f47de","share_with_app_devs":true,"build_version":"2.2.1","is_first_party":false,"bug_type":"109","name":"TransIP"} | |
Incident Identifier: 1688A02F-A828-4E9D-80E4-D2825E4AA86E | |
CrashReporter Key: a80feeff082bd894f4b469f6e473ccaa67072c82 | |
Hardware Model: iPhone7,1 | |
Process: TransIP [7660] | |
Path: /private/var/mobile/Containers/Bundle/Application/685D85BB-B84F-4BD7-ACC1-EE1245308744/TransIP.app/TransIP | |
Identifier: nl.transip.TransIP | |
Version: 2.2.1 | |
Code Type: ARM (Native) | |
Parent Process: launchd [1] |
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 Dictionary { | |
func test() { | |
for (key,value) in self { | |
//Works | |
if value is Int { | |
println("int") | |
} | |
//Throws compiler error: cannot downcast from 'Value' to a more optional type 'Int?' | |
if value is Int? { | |
println("optional int") |
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
#!/bin/bash | |
# Builds libevent for tvOS targets: | |
# AppleTVSimulator-x86_64, AppleTVOS-arm64. | |
# | |
# Copyright 2015 Niels van Hoorn <[email protected]> | |
# | |
# Based on work by Mike Tigas | |
# Copyright 2012 Mike Tigas <[email protected]> | |
# | |
# Based on work by Felix Schulze on 16.12.10. |
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
public protocol SynchronizedValueContaining: class { | |
typealias SynchronizedValueType | |
var _valueAccessorSerialQueue: dispatch_queue_t { get } | |
var _privateValue: SynchronizedValueType { get set } | |
} | |
public extension SynchronizedValueContaining { | |
var synchronizedValue: SynchronizedValueType { | |
get { | |
var v: SynchronizedValueType! |
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 Foundation | |
class Animal: NSObject { | |
} | |
protocol Named { | |
init(name: String) | |
} | |
protocol AnimalSpecification { |
OlderNewer