Skip to content

Instantly share code, notes, and snippets.

View ryanmcgrath's full-sized avatar
💭
==bG9s

Ryan McGrath ryanmcgrath

💭
==bG9s
View GitHub Profile
@danielmcgrath
danielmcgrath / RCTButtonManager.h
Last active June 11, 2016 18:41
Somewhat outdated example of creating an iOS React Native bridge for the Button SDK (https://www.usebutton.com/developers).
#import "RCTBridgeModule.h"
@interface ButtonManager : NSObject <RCTBridgeModule>
@end
@numo16
numo16 / Macros.h
Created August 20, 2012 20:38
Some useful iOS/Objective-C Macros
#define ApplicationDelegate ((AppDelegate *)[[UIApplication sharedApplication] delegate])
#define UserDefaults [NSUserDefaults standardUserDefaults]
#define NotificationCenter [NSNotificationCenter defaultCenter]
#define SharedApplication [UIApplication sharedApplication]
#define Bundle [NSBundle mainBundle]
#define MainScreen [UIScreen mainScreen]
#define ShowNetworkActivityIndicator() [UIApplication sharedApplication].networkActivityIndicatorVisible = YES
#define HideNetworkActivityIndicator() [UIApplication sharedApplication].networkActivityIndicatorVisible = NO
#define NetworkActivityIndicatorVisible(x) [UIApplication sharedApplication].networkActivityIndicatorVisible = x
#define NavBar self.navigationController.navigationBar
@sym3tri
sym3tri / JapaneseRegex.js
Created May 19, 2011 02:46
Regex to test for presence of Japanese characters
// REFERENCE UNICODE TABLES:
// http://www.rikai.com/library/kanjitables/kanji_codes.unicode.shtml
// http://www.tamasoft.co.jp/en/general-info/unicode.html
//
// TEST EDITOR:
// http://www.gethifi.com/tools/regex
//
// UNICODE RANGE : DESCRIPTION
//
// 3000-303F : punctuation
@indexzero
indexzero / base64.js
Created November 27, 2010 23:38
An extremely simple implementation of base64 encoding / decoding using node.js Buffers
//
// Super simple base64 encoding / decoding with node.js
//
var base64 = exports = {
encode: function (unencoded) {
return new Buffer(unencoded).toString('base64');
},
decode: function (encoded) {
return new Buffer(encoded, 'base64').toString('utf8');
The page at blog.nodejitsu.com says:
hello, i see you are coming from hacker news.
the article you clicked on was most certainly not submitted by nodejitsu.
news.ycombinator has a long history of squashing articles and submitters that aren't funded by y-comb.
most of this is done through their "silent" banning and censoring mechanisms, that leave people not even realizing they have been silenced.