Skip to content

Instantly share code, notes, and snippets.

View tosik's full-sized avatar
🏠
Working from home

Toshiyuki Hirooka tosik

🏠
Working from home
  • Tokyo, Japan
View GitHub Profile
@tosik
tosik / file0.txt
Created February 25, 2014 04:00
Adobe AIR for iOS の Low memory warning による GC 大量発生を無視する方法 ref: http://qiita.com/tosik/items/9f9b474f03777626a42d
// AirLowMemoryWarningSuppressor.h
#import <UIKit/UIKit.h>
#import "FlashRuntimeExtensions.h"
@interface AirLowMemoryWarningSuppressor : NSObject <UIApplicationDelegate>
@end
// AirLowMemoryWarningSuppressor.m
@tosik
tosik / Bar.as
Created February 27, 2014 02:05
as3signals で ActionScript3 の Event をやめよう ref: http://qiita.com/tosik/items/2c1596abf3d43077fe6e
var button:Button = new Button();
button.clicked.add(function():void {
trace("The button clicked.");
});
@tosik
tosik / file0.txt
Created February 27, 2014 08:00
iOS で広告識別子 ASIdentifierManager.advertisingIdentifier を使っていないか調べる方法 ref: http://qiita.com/tosik/items/a98496c09c60c2d3925d
nm -u libThirdParty.a | grep ASIdentifierManager
@tosik
tosik / poker.rb
Last active August 29, 2015 13:56
module Poker
class Card
attr_accessor :number, :mark
def initialize(number, mark)
@number = number
@mark = mark
end
def number_string
新宿駅
山手線、中央線、埼京線、湘南新宿ライン、中央総武線、京王線、京王新線、都営新宿線、大江戸線、丸ノ内線、小田急小田原線
新宿三丁目駅
都営新宿線、丸ノ内線、副都心線、
代々木駅
中央総武線、山手線、大江戸線
南新宿駅
public class Application extends Sprite
{
public function Apllication()
{
var context:Context = new Context()
.install(MVCSBundle)
.configure(MainConfig)
.configure(ContextView(this))
context.initialize();
}
@tosik
tosik / main.c
Created March 17, 2014 02:37
iOS 用 mruby XCode ライブラリ "MRuby.framework" を作る簡単な方法 ref: http://qiita.com/tosik/items/73c4253d132ebe610240
#include <MRuby/mruby.h>
#include <Mruby/mruby/proc.h>
@tosik
tosik / mrb_objc.mm
Created March 18, 2014 03:15
mruby on iOS 導入部分メモ
mrb = mrb_open();
NSString * bcfile = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"context.mrb"];
NSFileHandle * fileHandle = [NSFileHandle fileHandleForReadingAtPath:bcfile];
NSData * data = [fileHandle readDataToEndOfFile];
uint8_t * bytes = (uint8_t *)malloc([data length]);
memcpy(bytes, [data bytes], [data length]);
[fileHandle closeFile];
mrb_load_irep(mrb, bytes);
@tosik
tosik / gist:9616445
Created March 18, 2014 09:18
homebrew でインストールした jenkins の再起動
$ launchctl list | grep jenkins
28201 - homebrew.mxcl.jenkins
$ launchctl stop homebrew.mxcl.jenkins
$ launchctl list | grep jenkins
- 143 homebrew.mxcl.jenkins
$ launchctl start homebrew.mxcl.jenkins
$ launchctl list | grep jenkins
16812 - homebrew.mxcl.jenkins
class Bar
end