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
/*-------------------------------------------------------------------------------- | |
カメラロールからムービーを選択する | |
--------------------------------------------------------------------------------*/ | |
- (void)chooseMovie{ | |
// フォトライブラリが使えるか確認 | |
if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]){ | |
// 使える | |
UIImagePickerController *picker=[[UIImagePickerController alloc]init]; |
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
NSString *path = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"mp4"]; | |
NSURL *url = [NSURL fileURLWithPath:path]; | |
NSLog(@"%@",url.absoluteString); |
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; |
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
find フォルダ名 -name .svn -exec rm -rf {} \; |
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
isCanvasSupported_=do ()-> | |
elm=document.createElement('canvas') | |
return !!(elm.getContext && elm.getContext('2d')) |
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 Hoge | |
constructor:()-> | |
createjs.Ticker.addEventListener('tick',@_checkStage) | |
_checkStage:()=> | |
if @getStage() | |
createjs.Ticker.removeEventListener('tick',@_checkStage) | |
createjs.Ticker.addEventListener('tick',@_onTick) |
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
montage -rotate 90 -resize x300 -geometry +0+0 -tile x1 in0.png in1.png out.png |
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
// !が重要。テキスト部分に関しては特に何もしなくても大丈夫。属性値部分は=だけだとエンコードされちゃう。 | |
a(href!='<?php echo $foo; ?>') <?php echo $foo; ?> |
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
[self performSelector:@selector(timerHandler) withObject:nil afterDelay:1.0]; |
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
# modules | |
gulp = require 'gulp' | |
connect = require 'gulp-connect' | |
coffee = require 'gulp-coffee' | |
gutil = require 'gulp-util' | |
sourcemaps = require 'gulp-sourcemaps' | |
concat = require 'gulp-concat' | |
gulpif = require 'gulp-if' | |
uglify = require 'gulp-uglify' |