This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Singleton | |
_instance = null | |
class _Singleton | |
constructor: (initObj) -> | |
for k,v of initObj | |
@[k]=v | |
@getInstance: (initObj) -> | |
_instance ?= new _Singleton(initObj) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Main | |
constructor:()-> | |
@_stage=new createjs.Stage('Canvas') | |
@_enablePointerEvents(false) | |
@_stage.enableMouseOver(20) | |
@_btn=new createjs.Shape() | |
@_stage.addChild(@_btn) | |
@_btn.graphics.beginFill('red') | |
@_btn.graphics.drawRect(0,0,100,100) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Box extends createjs.Shape | |
constructor:(@width=100,@height=100,@fill='red')-> | |
@initialize() | |
@graphics.beginFill(@fill) | |
@graphics.drawRect(0, 0, @width, @height) | |
@graphics.endFill() | |
stage=new createjs.Stage('Canvas') | |
stage.enableMouseOver(10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BaseButton extends Container | |
constructor:(@width=100,@height=10)-> | |
@initialize() | |
sh = new Box(@width,@height) | |
@addChild(sh) | |
@addEventListener('mouseover',@_onMouseOver) | |
@addEventListener('mouseout',@_onMouseOut) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#AIR SDKの圧縮ファイルをFlex SDKのディレクトリ内においといて | |
cd ${MY_FLEX_SDK_DIRECTORY} | |
sudo tar jxvf ${MY_AIR_SDK_ARCHIVE_FILE} | |
#確認 | |
bin/adt -version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(1) | |
プロジェクトのルートディレクトリにある | |
.actionScriptProperties | |
を開く | |
(2) | |
useFlashSDK="true" | |
という記述があるので | |
useFlashSDK="false" | |
にする |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[SWF(width="800", height="600", backgroundColor="#FFFFFF", frameRate="30")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(1) | |
~/.ssh/known_hosts | |
を開く | |
(2) | |
hoge,192.168.0.1 ssh-rsa AAAAB3N……15s= | |
のような記述が並んでいるので、該当のホストの行を探し、削除する |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#確認 | |
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*-------------------------------------------------------------------------------- | |
URLを指定して動画を再生 | |
--------------------------------------------------------------------------------*/ | |
- (void)playMovie:(NSURL *)url { | |
// MPMoviePlayerViewController作成 | |
self.moviePlayerView = [[MPMoviePlayerViewController alloc] initWithContentURL:url]; | |
// 自動再生しない | |
MPMoviePlayerController *p=self.moviePlayerView.moviePlayer; |