Skip to content

Instantly share code, notes, and snippets.


Satoshi Asano ninjinkun

View GitHub Profile
View gist:4e61c61cd9f5c90970a4
#import "ScrollsToTopManager.h"
@interface ScrollsToTopManager()
@property (nonatomic) NSHashTable *scrollViews;
@implementation ScrollsToTopManager
+ (instancetype)sharedManager
ninjinkun / NSURLConnectionRetainTest.m
Last active Dec 16, 2015
does NSURLConnection block method has circular reference problem? Result is no.
View NSURLConnectionRetainTest.m
#import <Foundation/Foundation.h>
@interface BlockTest : NSObject
@implementation BlockTest {
NSOperationQueue *_queue;
NSString *_str;
ninjinkun / gist:5361327
Created Apr 11, 2013
ObjC ugomemo sample
View gist:5361327
#import <Foundation/Foundation.h>
id apiRequest(NSString *url)
NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:url]];
NSHTTPURLResponse *res;
NSError *error;
NSData *data = [NSURLConnection sendSynchronousRequest:req returningResponse:&res error:&error];
if (error) {
return nil;
View gist:3888103
// NSString* url = [NSString stringWithFormat:@"", [screenName gtm_stringByEscapingForURLArgument]];
NSString *url = [NSString stringWithFormat:@"", screenName]; // はてなのURLに変更
ninjinkun /
Created Feb 14, 2012
Itunes Connect Report Downloader
use common::sense;
use HTTP::Request::Common;
use LWP::UserAgent;
use URI;
use Compress::Zlib;
use Perl6::Say;
my $uri = URI->new("");