Skip to content

Instantly share code, notes, and snippets.

@ikekou
ikekou / gist:5990479
Created July 13, 2013 11:52
[ImageMagick] ImageMagickのmontageで、時計回りに90度回転させた画像を縦最大300pxでリサイズして横方向に並べて1枚の画像にする
montage -rotate 90 -resize x300 -geometry +0+0 -tile x1 in0.png in1.png out.png
@ikekou
ikekou / gist:5939307
Last active December 19, 2015 10:19
[CoffeeScript][JavaScript][CreateJS] Event.ADDED_TO_STAGEのかわり
class Hoge
constructor:()->
createjs.Ticker.addEventListener('tick',@_checkStage)
_checkStage:()=>
if @getStage()
createjs.Ticker.removeEventListener('tick',@_checkStage)
createjs.Ticker.addEventListener('tick',@_onTick)
@ikekou
ikekou / gist:5926046
Created July 4, 2013 08:48
[Javascript][Coffeescript] canvas使えるかチェック
isCanvasSupported_=do ()->
elm=document.createElement('canvas')
return !!(elm.getContext && elm.getContext('2d'))
@ikekou
ikekou / gist:5914806
Created July 3, 2013 01:40
[Shell][Subversion] SVNファイルを消すコマンド
find フォルダ名 -name .svn -exec rm -rf {} \;
@ikekou
ikekou / gist:5840160
Created June 22, 2013 09:32
[Objective-C] アプリのパッケージング時に含んだファイルのURLを取得する
NSString *path = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"mp4"];
NSURL *url = [NSURL fileURLWithPath:path];
NSLog(@"%@",url.absoluteString);
@ikekou
ikekou / gist:5840178
Created June 22, 2013 09:39
[Objective-C] URLを指定して動画を再生(MPMoviePlayerViewController使う場合)
/*--------------------------------------------------------------------------------
URLを指定して動画を再生
--------------------------------------------------------------------------------*/
- (void)playMovie:(NSURL *)url {
// MPMoviePlayerViewController作成
self.moviePlayerView = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
// 自動再生しない
MPMoviePlayerController *p=self.moviePlayerView.moviePlayer;
@ikekou
ikekou / gist:5677273
Created May 30, 2013 11:36
[AWS][Shell] ローカルのやつをAWSにrsyncしてみる
#確認
rsync --dry-run -av --delete --exclude ".DS_Store" --exclude "tmp/*" -r -e "ssh -i rsynctestkey.pem" ~/Desktop/rsync_test/foo/ ec2-user@ec2-XX-XX-XX-XX.ap-northeast-1.compute.amazonaws.com:/var/www/bar/
#実行
rsync -av --delete --exclude ".DS_Store" --exclude "tmp/*" -r -e "ssh -i rsynctestkey.pem" ~/Desktop/rsync_test/foo/ ec2-user@ec2-XX-XX-XX-XX.ap-northeast-1.compute.amazonaws.com:/var/www/bar/
@ikekou
ikekou / gist:5668174
Last active December 17, 2015 20:29
[OpenSSH] SSH繋ごうとして、「WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!」というエラーが出たとき
(1)
~/.ssh/known_hosts
を開く
(2)
hoge,192.168.0.1 ssh-rsa AAAAB3N……15s=
のような記述が並んでいるので、該当のホストの行を探し、削除する
@ikekou
ikekou / gist:5661603
Last active December 17, 2015 19:39
[Flash][ActionScript]すぐ忘れるSWFのメタタグ
[SWF(width="800", height="600", backgroundColor="#FFFFFF", frameRate="30")]
@ikekou
ikekou / gist:5652008
Last active December 17, 2015 18:19
[Flash][AIR] FlashBuilderでActionScriptプロジェクト(Desktop)作成時に任意のSDKを選べるようにする
(1)
プロジェクトのルートディレクトリにある
.actionScriptProperties
を開く
(2)
useFlashSDK="true"
という記述があるので
useFlashSDK="false"
にする