Skip to content

Instantly share code, notes, and snippets.

View 3ign0n's full-sized avatar

AOYAMA hiroyuki 3ign0n

View GitHub Profile
@3ign0n
3ign0n / starIOPrintSDK.podspec
Last active August 29, 2015 14:21
starIOPrintSDK.podspec for 3.13.1
Pod::Spec.new do |s|
s.name = "starIOPrintSDK"
s.version = "3.13.1"
s.summary = "Star Micronics iOS Print SDK"
s.description = " This package contains StarIO and its SDK.\n StarIO is a library for supporting to develope application for Star printers.\n\n StarIO.framework version: 1.19.2\n Supported OS: iOS 5.1.1 - 8.2\n\n Please refer to document including this package for details.\n"
s.homepage = "http://www.starmicronics.com/support/sdkdocumentation.aspx"
s.platform = :ios, "5.1.1"
s.license = { :type => "Commercial", :text => " This package contains StarIO and its SDK.\n StarIO is a library for supporting to develope application for Star printers.\n\n StarIO.framework version: 1.19.2\n Supported OS: iOS 5.1.1 - 8.2\n\n Please refer to document including this package for details.\n" }
s.author = { "Star Micronics Co., Ltd.": "contact@starmicronics.com" }
s.source = { :http => "http://www.starmicronics.com/suppo
@3ign0n
3ign0n / gist:43dd799c33331c3de603
Created April 5, 2015 15:23
Get pixel data from CGImageRef
- (void)testGetPixelDataFromCGImageRefExample {
UIImage *image = [self loadImage];
[self rawDataCopyWithImage:image];
[self rawDataDrawWithImage:image];
}
- (void)rawDataCopyWithImage:(UIImage*)image
{
CGImageRef imageRef = image.CGImage;
@3ign0n
3ign0n / gist:c5fd12ad6fe63a174d02
Last active August 29, 2015 14:18
Realm concurrency write test with huge data
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import <Realm/Realm.h>
@interface Person: RLMObject
@property (nonatomic, copy) NSString* name;
@property (nonatomic, copy) NSDate* birthdate;
@end
@implementation Person
@3ign0n
3ign0n / gist:58c9c34ac2c1c5f9a1ff
Created March 29, 2015 13:46
A MOAspects test case for instance object with class hierarchy
- (void)testChildInstance
{
NSString *string;
MOAspectsTestChildObject* testChildObj = [[MOAspectsTestChildObject alloc] init];
string = [testChildObj stringWithBOOL:YES];
XCTAssertTrue([string isEqualToString:@"真"]);
string = [testChildObj stringWithBOOL:NO];
XCTAssertTrue([string isEqualToString:@"偽"]);
__block NSString *hookedString;
@3ign0n
3ign0n / gist:fdb60f836da3aeff447f
Created March 29, 2015 13:16
just a test with MOAspects
//
// MOAspectsClassHierarchyTestCase.m
// MOAspectsDemo
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "MOAspects.h"
@3ign0n
3ign0n / gist:b4159a1c487cae4d3a91
Last active August 29, 2015 14:17
Why SenTest is checking type encoding? This test case is failed in SenTest even though it's passed in XCTest
- (void)testWhySenTestIsCheckingTypeEncoding
{
NSInteger a1 = 100;
STAssertEquals(a1, 100, @"type encoding mismatch!!");
}
find . -name "*.[mh]" -print0 | xargs -0 uncrustify -c ~/.uncrustify/uncrustify.cfg --replace --no-backup
@3ign0n
3ign0n / a patch for homebrew downloader to accept insecure SSL certificate
Created September 8, 2013 00:09
This patch tentatively resolves home brew issues such as https://github.com/mxcl/homebrew/issues/22106 and enables homebrew to install applications hosted on the server with self-signed SSL certificate
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 7d0115c..e1631b9 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -61,7 +61,7 @@ class CurlDownloadStrategy < AbstractDownloadStrategy
# Private method, can be overridden if needed.
def _fetch
- curl @url, '-C', downloaded_size, '-o', @temporary_path
+ curl '-k', @url, '-C', downloaded_size, '-o', @temporary_path
@3ign0n
3ign0n / gist:4072336
Created November 14, 2012 14:15
add proxy support to Tizen gbs(gitbuildsys)
--- gitbuildsys/utils.py.orig 2012-11-14 22:23:01.000000000 +0900
+++ gitbuildsys/utils.py 2012-11-15 07:33:56.000000000 +0900
@@ -23,6 +23,7 @@
import pycurl
import hashlib
import signal
+import re
import xml.etree.ElementTree as ET
from collections import defaultdict