I hereby claim:
- I am felixjendrusch on github.
- I am felixjendrusch (https://keybase.io/felixjendrusch) on keybase.
- I have a public key whose fingerprint is 1D06 12E2 3CB9 76AB 3EDB 7982 4176 262E 7197 C6D3
To claim this, I am signing this object:
describe("Something", function () { | |
it("should promise", promising(function () { | |
return Promise.reject("Ouch!"); | |
})); | |
}); |
var service = ...; // webinos file api service | |
promisify(service.requestFileSystem, service)(null, null) | |
.then(function (filesystem) { | |
return filesystem.root; | |
}) | |
.then(function (root) { | |
return promisify(root.getFile, root)("test", { create : true }); | |
}) | |
.then(function (file) { |
// | |
// AdapativeConstraintGroup.swift | |
// CartographyDemo | |
// | |
// Created by Felix Jendrusch on 2/3/15. | |
// Copyright (c) 2015 Felix Jendrusch. All rights reserved. | |
// | |
import Cartography |
struct Value { | |
var property: Int = 0 | |
mutating func change() { | |
property++ | |
} | |
func changed() -> Value { | |
var copy = self | |
copy.property++ |
#import <Foundation/Foundation.h> | |
#import <JazzHands/IFTTTJazzHands.h> | |
@interface MyCustomValue : NSValue <IFTTTInterpolatable> | |
@property (nonatomic, assign, readonly) CGPoint controlPoint1; | |
@property (nonatomic, assign, readonly) CGPoint controlPoint2; | |
- (instancetype)initWithCGRect:(CGRect)rect controlPoint1:(CGPoint)controlPoint1 controlPoint2:(CGPoint)controlPoint2; |
public class View: UIView { | |
public override var traitCollection: UITraitCollection { | |
return UITraitCollection(traitsFromCollections: [ | |
UITraitCollection(horizontalSizeClass: .Compact), | |
UITraitCollection(verticalSizeClass: .Compact) | |
]) | |
} | |
} | |
let view = View() |
import CoreGraphics | |
public struct Interpolation<Value> { | |
private let interpolateFunc: (from: Value, to: Value, at: CGFloat) -> Value | |
public init(interpolate interpolateFunc: (from: Value, to: Value, at: CGFloat) -> Value) { | |
self.interpolateFunc = interpolateFunc | |
} | |
public func interpolate(from: Value, to: Value, at: CGFloat) -> Value { |
I hereby claim:
To claim this, I am signing this object:
import PlaygroundSupport | |
PlaygroundPage.current.needsIndefiniteExecution = true | |
import Combine | |
import Dispatch | |
/// Returns a subscriber that buffers up to `size` values before calling the given `handler`. The | |
/// subscriber will request more values from the upstream publisher once the `completion` closure | |
/// given to the `handler` is called. | |
func subscriber<Output, Failure>(size: Int, handler: @escaping (_ values: [Output], _ completion: @escaping () -> ()) -> ()) -> AnySubscriber<Output, Failure> { |
import PlaygroundSupport | |
PlaygroundPage.current.needsIndefiniteExecution = true | |
import Combine | |
import Dispatch | |
import Foundation | |
(1...10) | |
.publisher() | |
.handleEvents(receiveOutput: { print("publisher sent \($0)") }) |