I hereby claim:
- I am eliperkins on github.
- I am eliperkins (https://keybase.io/eliperkins) on keybase.
- I have a public key whose fingerprint is 9366 A899 5661 5641 D9F3 4624 99EA EEFE A3AA 2D9A
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
require 'colored2' | |
require 'octokit' | |
require 'yaml' | |
if ENV['GITHUB_TOKEN'].nil? | |
puts '❗️ GITHUB_TOKEN environment variable is not set!'.red | |
puts 'Supply a token from gh CLI by running `GITHUB_TOKEN=$(gh auth token) script/check-outdated-deps.rb`' |
struct SomeStruct { | |
init(someReallyExpensiveValue: @autoclosure () -> Int) { | |
print("really expensive") | |
Thread.sleep(forTimeInterval: TimeInterval(someReallyExpensiveValue() * 1)) | |
} | |
init(someEvenMoreExpensiveValue: @autoclosure () -> Int) { | |
print("even more expensive") | |
Thread.sleep(forTimeInterval: TimeInterval(someEvenMoreExpensiveValue() * 5)) | |
} |
import UIKit | |
@objc(CLBLinearGradientView) | |
class LinearGradientView: UIView { | |
@objc var layerBacked: Bool { | |
didSet { | |
switch (layerBacked, layerView) { | |
case (true, .none): addLayerView() | |
case (false, .some): removeLayerView() | |
default: break |
//: Playground - noun: a place where people can play | |
//: Super Bowl Squares - noun: free money | |
import Foundation | |
import PlaygroundSupport | |
enum Player: String { | |
case eli = "Eli" | |
case brian = "Brian" | |
case brendan = "Brendan" |
I hereby claim:
To claim this, I am signing this object:
import RxSwift | |
let A = Observable.just(()) | |
let B = Observable.just(()) | |
let C = Observable.just(()) | |
let AorB = Observable.combineLatest(A, B) { (a, b) in | |
return () | |
} |
protocol Able { | |
init?(foo: String) | |
} | |
protocol Ible { | |
init(bar: Int) throws | |
} | |
extension Able where Self: Ible { | |
init?(foo: String) { |
// Given that a protocol unifies two types: BlogPost and PhotoPost... | |
protocol PostType { | |
var title: String { get } | |
} | |
struct BlogPost: PostType { | |
let title = "My Hot New Blog Post" | |
} | |
struct PhotoPost: PostType { |
//: Mocks Playground | |
import UIKit | |
struct User { | |
} | |
struct PushNotificationController { | |
let registrar: PushNotificationRegistrar | |
init(registrar: PushNotificationRegistrar) { |