I hereby claim:
- I am darrarski on github.
- I am darrarski (https://keybase.io/darrarski) on keybase.
- I have a public key whose fingerprint is DBDD 81D8 99ED 9772 2D28 86D0 F759 CCF6 8E12 6988
To claim this, I am signing this object:
# | |
# Uncrustify Configuration File | |
# File Created With UncrustifyX 0.4.3 (252) | |
# | |
# Alignment | |
# --------- | |
## Alignment |
I hereby claim:
To claim this, I am signing this object:
module Fastlane | |
module Actions | |
module SharedValues | |
IPA_OUTPUT_PATH = :IPA_OUTPUT_PATH | |
end | |
class BuildSignedIpaAction < Action | |
def self.run(params) | |
workspace_path = params[:workspace_path] | |
scheme = params[:scheme] |
import Foundation | |
class User { | |
let name: String | |
init(name: String) { | |
self.name = name | |
} | |
// | |
// Created by Dariusz Rybicki on 17/04/16. | |
// Copyright © 2016 Darrarski. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
/** | |
Returns number of seconds since system became idle | |
#import <Foundation/Foundation.h> | |
@interface ArrayMapper <InputType, OutputType> : NSObject | |
- (nonnull NSArray <OutputType> *)map:(nonnull NSArray <InputType> *)inputArray withBlock:(nonnull OutputType _Nonnull (^)(InputType _Nonnull obj))block; | |
- (nonnull NSArray <OutputType> *)flatMap:(nonnull NSArray <InputType> *)inputArray withBlock:(nonnull OutputType _Nullable (^)(InputType _Nonnull obj))block; | |
@end | |
@implementation ArrayMapper |
import UIKit | |
extension UIColor { | |
convenience init?(hexRed red: Int, green: Int, blue: Int, alpha: Int = 255) { | |
guard red >= 0 && red <= 255 else { return nil } | |
guard green >= 0 && green <= 255 else { return nil } | |
guard blue >= 0 && blue <= 255 else { return nil } | |
self.init(red: CGFloat(red) / 255.0, |
extension String { | |
/// For "TEST" returns ["T", "TE", "TES", "TEST"] | |
var keystrokeSubsequences: [String] { | |
let start = distance(from: startIndex, to: startIndex) | |
let end = distance(from: startIndex, to: endIndex) | |
return (start...end).map { index in | |
let substringEnd = self.index(startIndex, offsetBy: index) | |
let substring = self[..<substringEnd] | |
return String(substring) |
// MIT License | |
// | |
// Copyright (c) 2017 Dariusz Rybicki Darrarski | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
extension ObservableType { | |
func retry(_ maxAttemptCount: Int = 1, when: @escaping (Error) -> Observable<Void>) -> Observable<E> { | |
return retryWhen { errorObservable -> Observable<Void> in | |
var retries = maxAttemptCount | |
return errorObservable.flatMap { error -> Observable<Void> in | |
guard retries > 0 else { return Observable.error(error) } | |
retries -= 1 | |
return when(error) | |
} | |
} |