Skip to content
View keybase.md

Keybase proof

I hereby claim:

  • I am sidnicious on github.
  • I am potato (https://keybase.io/potato) on keybase.
  • I have a public key is ASDTX2oyybeG_W9qAeEabhkPoS6z4CVGI57aXU1u_TGzxAo

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am Sidnicious on github.
  • I am potato (https://keybase.io/potato) on keybase.
  • I have a public key whose fingerprint is 1CD3 2E3C 469D 0CBB 4DE8 AE50 60C7 152C 5E2C D5CE

To claim this, I am signing this object:

View AppDefault.swift
enum AppDefault {
case APIServer, RunMode, HomeDirectory, ReactHost
var stringValue: String? {
get {
return NSUserDefaults.standardUserDefaults().stringForKey(String(self))
}
nonmutating set {
if let newValue = newValue {
View ratelimiter.coffee
class RateLimiter
constructor : (@max, @interval) ->
@table = {}
hit : (key) ->
now = +new Date
if (hits = @table[key])?
if hits.length is @max
return false
View example.iced
miniled = require 'miniled'
sign = miniled.signs()[0]
await sign.open defer()
sign.set 'Hello, world!'
View delay.swift
func delay(interval: NSTimeInterval) -> Promise<()> {
return Promise<()> { resolve, reject in
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(interval * NSTimeInterval(NSEC_PER_SEC))), dispatch_get_main_queue(), resolve)
}
}
View gist:5d19ba0ab24862cbdcb4
http://www.holeintheceiling.com/blog/2012/08/14/mountain-lion-and-ssh/
View CLLocationManager+getLocation.swift
import CoreLocation
extension CLLocationManager {
class func getLocation(accuracy: CLLocationAccuracy) -> Promise<CLLocation> {
class GetLocationDelegate: NSObject, CLLocationManagerDelegate {
var holdSelf: GetLocationDelegate?
let locationManager = CLLocationManager()
let promise: Promise<CLLocation>
let resolve: CLLocation -> ()
View invitation.md

Dear Developer,

Thank you for your interest in developing for Amazon Echo. We would like to invite you to participate in our Amazon Echo Developer Program. As an early adopter developer, we would value your feedback on the Amazon Echo developer experience.

If you are interested in participating in the Amazon Echo Developer Program, please complete the following steps by Wednesday, March 18, 2015 as space is limited:

  1. Register for the Amazon Appstore (if you’ve not already done so);
  2. Review the Nondisclosure Agreement (NDA) included below;
  3. Reply to this e-mail (alexa-echo-developers@amazon.com) and make sure the original message is included below your response. It’s important the text of the NDA be included in your reply.
    • Write the following in the text of your e-mail: “I hereby agree to the nondisclosure agreement included below. [Your full name here], [City, State, Country]”
View Generator.swift
import Foundation
class Generator<T>: GeneratorType, SequenceType {
var val: T? = nil
let yieldSemaphore = dispatch_semaphore_create(0)
let valueSemaphore = dispatch_semaphore_create(0)
init(f: ((T) -> ()) -> ()) {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
Something went wrong with that request. Please try again.