Skip to content

Instantly share code, notes, and snippets.

@mywizz
mywizz / gist:8806645
Created February 4, 2014 16:07
DLog
#ifdef DEBUG
# define DLog(...) NSLog(__VA_ARGS__)
#else
# define DLog(...)
#endif
#define ALog(...) NSLog(__VA_ARGS__)
@mywizz
mywizz / gist:6396743
Created August 31, 2013 07:33
사파리에서 현재 열려있는 클량 게시판이나 게시물을 ClienKit에서 보는 (뻘)북마클릿
javascript:void(function(w){var%20u=w.document.location;var%20x=/bo_table=([_a-z]+)/;var%20y=/wr_id=([0-9]+)/;var%20c,a=[];if((m=x.exec(u))){c='list';a.push('board='+m[1]);}if((n=y.exec(u))){c='read';a.push('id='+n[1]);}if(c){w.location.href='clienkit://x-callback-url/'+c+'?'+a.join('&');}})(window)
@mywizz
mywizz / NSString+URLDetect.h
Created December 26, 2011 07:20
Determines NSString has URL in it, returns extracted URLs with duplicates removed.
#import <Foundation/Foundation.h>
@interface NSString (URLDetect)
-(BOOL)hasURLs;
-(NSArray *)componentsByDetectedURLs;
@end