Skip to content

Instantly share code, notes, and snippets.

@yokotak0527
yokotak0527 / gist:5151272
Created March 13, 2013 11:32
ゆっくり喋らせる
'use strict';
// =============================================================================
// 変更点
// =============================================================================
// '<config:prop.subprop>' → '<%= prop.subprop %>'
// '<json:file.json>' → grunt.file.readJSON('file.json')
// '<file_template:file.js>' → grunt.template.process(grunt.file.read('file.js'))
module.exports = function(grunt){
@yokotak0527
yokotak0527 / gist:5166676
Last active December 14, 2015 23:38
orig_concat動かす為にexecを使うのはなんか違う気がする。後で調べる
'use strict';
module.exports = function(grunt){
var config = grunt.config,
exec = require('child_process').exec,
say = 'say -v kyoko ';
var jsDir = 'sample/build/'; // jsのディレクトリ
var jsDestDir = 'sample/';
@yokotak0527
yokotak0527 / gist:5193203
Created March 19, 2013 02:18
macからNASへのアクセスが多い場合 参考 -> http://ymkn.hatenablog.com/entry/2012/09/24/002517
/etc/sysctl.confに
net.inet.tcp.delayed_ack=0
@yokotak0527
yokotak0527 / gist:5211058
Created March 21, 2013 06:23
WordPressのエディターを強制的にHTMLモードにする
add_action('admin_head','page_editor');
function page_editor(){
global $post_type;
global $user_ID;
// 固定ページの場合HTMLエディターに
if($post_type == 'page'){
add_filter('user_can_richedit','__return_false');
}
};
@yokotak0527
yokotak0527 / gist:5235458
Created March 25, 2013 07:29
IE6で画像リサイズ
img{
max-width:250px;
width: expression(this.width >= this.height ? '250px' : 'auto');
}
@yokotak0527
yokotak0527 / gist:5924800
Created July 4, 2013 03:52
JSで気になる書き方
var obj = {};
(obj.Func = function(){}).prototype = {};
import js.Lib;
class Main{
static function main(){
js.Lib.alert('hoge');
}
}
/*
var shadow_cvs,shadow_ctx,box_blur,bounds;
shadow_cvs = document.createElement('canvas');
shadow_ctx = shadow_cvs.getContext('2d');
this.body.draw(shadow_ctx,true);
this.shadow_body = new cjs.Bitmap(shadow_cvs);
this.shadow_body.set({
x:7,
y:5,
scaleX:1.1,
@yokotak0527
yokotak0527 / gist:6157009
Created August 5, 2013 15:52
TypeScript 関数の書き方メモ
// function 文の型注訳
function func0(str:string):string{
return str;
}
// ------------------------------------------------
// function 式の型注訳
var func1:(str:string) => string = function(str){
return str;
@yokotak0527
yokotak0527 / gist:6274466
Last active December 21, 2015 07:58
射影変換 ( ホモグラフィ )
     bx + by + c
u = -------------
     gx + yh + 1

     dx + ey + f
v = -------------
     gx + hy + 1

平面射影変換