Skip to content

Instantly share code, notes, and snippets.


David Ng david90

View GitHub Profile
david90 / skip_extension
Created Jul 8, 2015
Check not in extension
View skip_extension
#if !(defined(__has_feature) && __has_feature(attribute_availability_app_extension))
// some [UIApplication sharedApplication] code
david90 / gist:92e87125154dd268351b
Created Jul 7, 2015
Regex to block spam referral in google analytics
View gist:92e87125154dd268351b

Copied from

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
david90 /
Created Jul 8, 2014
Compare Version String in iOS
- (BOOL) isVersion:(NSString *)thisVersionString higherThan:(NSString *)thatVersionString {
if ([thisVersionString compare:thatVersionString options:NSNumericSearch] == NSOrderedAscending) {
NSLog(@"%@ < %@", thisVersionString, thatVersionString);
return NO;
if ([thisVersionString compare:thatVersionString options:NSNumericSearch] == NSOrderedSame) {
View sshTunnel
ssh -D 8080 -C -N
View CopyPublicKey
pbcopy < ~/.ssh/
# Copies the contents of the file to your clipboard