Skip to content

Instantly share code, notes, and snippets.

View bryanoltman's full-sized avatar

Bryan Oltman bryanoltman

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bryanoltman on github.
  • I am oltman (https://keybase.io/oltman) on keybase.
  • I have a public key whose fingerprint is 9F5B A5CD 545D 4CF3 DABE B372 548B 4FF4 A988 C946

To claim this, I am signing this object:

func webSocket(webSocket: SRWebSocket!, didReceiveMessage message: AnyObject!) {
guard let rawString: String = message as? String,
let data: NSData = rawString.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false) else {
return
}
var json : [String : AnyObject]
do {
try json = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.AllowFragments) as! [String : AnyObject]
} catch {

Keybase proof

I hereby claim:

  • I am bryanoltman on github.
  • I am oltman (https://keybase.io/oltman) on keybase.
  • I have a public key whose fingerprint is 9904 0075 3027 98CE 5110 9307 E6B3 635D 2F51 B956

To claim this, I am signing this object:

@bryanoltman
bryanoltman / NSDate+Comparators.m
Created December 6, 2012 16:57
A simple category on NSDate to make comparison more human-readable
@interface NSDate (Comparators)
- (BOOL)isEarlierThan:(NSDate*)otherDate;
- (BOOL)isLaterThan:(NSDate*)otherDate;
@end
@implementation NSDate (Comparators)