Skip to content

Instantly share code, notes, and snippets.

View rgerard's full-sized avatar

Ryan Gerard rgerard

View GitHub Profile
@rgerard
rgerard / gist:0379b34e4b5155b6b98a31bdce76e91e
Created November 6, 2017 23:23
Blockstack Verification
Verifying my Blockstack ID is secured with the address 12dryd6NSosUrMQcapZTASjZWtBEpcHnHt https://explorer.blockstack.org/address/12dryd6NSosUrMQcapZTASjZWtBEpcHnHt

Keybase proof

I hereby claim:

  • I am rgerard on github.
  • I am rtg (https://keybase.io/rtg) on keybase.
  • I have a public key whose fingerprint is BAFB 9F24 6E18 B70B CFB7 924D 1B55 BF5D 16F0 B330

To claim this, I am signing this object:

@rgerard
rgerard / IsValidBST
Last active December 17, 2015 04:49
Determines whether a node is part of a valid binary search tree
// isValidBST() should return whether or not a given node is a valid binary search tree
//
// Assumes the following object:
// @interface Node
// @property (nonatomic) Node *left;
// @property (nonatomic) Node *right;
// @property (nonatomic) NSNumber *value;
// @end
- (BOOL)isValidBST(Node *root) {
@rgerard
rgerard / NSString+Additions.h
Created July 16, 2012 00:40
NSString category that returns an NSNumber with the correct ordinal ending. This was borrowed from http://stackoverflow.com/questions/3312935/nsnumberformatter-and-th-st-nd-rd-ordinal-number-endings
#import <Foundation/Foundation.h>
@interface NSString (Additions)
+ (NSString*)ordinalNumberFormat:(NSNumber *)numObj;
@end