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
// データやりとり云々よりちょっとしたアニメーションムービーとかに使いたい | |
// 普通にDeferred使うよりもシンプルに書きたかった | |
var stack = []; | |
$.chain( | |
function(c){ | |
setTimeout(function(){ | |
stack.push("foo"); | |
c.done(); // これで次へ |
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
/** | |
* TermColor | |
* --------- | |
* Stylize or color output string on terminal | |
*/ | |
var util = require("util"); | |
/** | |
* TermColor |
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
/** | |
* Wstring | |
* ------- | |
* Library to deal with width of multibyte strings | |
*/ | |
(function(global){ | |
var Wstring = { |
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
#!/usr/bin/env node | |
var dbox = require("dbox"), | |
rl = require("readline").createInterface(process.stdin, process.stdout), | |
opts = require("opts"), | |
fs = require("fs"); | |
var Main = { |
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
var util = { | |
isObject : function(o){ | |
return o instanceof Object | |
&& Object.prototype.toString.call(o) === "[object Object]"; | |
}, | |
isArray : function(a){ | |
return Object.prototype.toString.call(a) === "[object Array]"; | |
}, |
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
(function(global, undefined){ | |
var Chain, u, chain; | |
u = {}; | |
u.isFunction = function(f){ | |
return !!(f && f.constructor && f.call && f.apply); | |
}; | |
u.isArray = function(a){ | |
return Object.prototype.toString.call(a) === "[object Array]"; |
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
ぼうがいっぽんあったとさ | |
はっぱかな? | |
はっぱじゃないよ かえるだよ | |
かえるじゃないよ あひるだよ | |
ろくがつむいかにあめざぁざぁ | |
さんかくじょうぎにひびいって | |
こっぺぱんふたつ まめみっつ | |
あんぱんふたつくださいな | |
あっ |
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
html { | |
background-color: #f0f0f0; | |
} | |
body { | |
background-color: #fff; | |
width: 660px; | |
padding: 20px 20px 50px 20px; | |
margin: 0 auto; | |
font-family:'メイリオ',Meiryo,'ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro','MS Pゴシック',sans-serif; | |
font-size: 13px; |
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
module.exports = function(grunt){ | |
var exec = require("child_process").exec; | |
grunt.registerMultiTask( | |
"lessc", | |
"Compile less css", | |
function(){ | |
var data, cmd, dist, done; |
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
/** | |
* app.require("foo.js", "bar.js", ...); で読み込んでいるファイルを | |
* 読み込み先ファイルを連結・ミニファイした内容で「上書き」する。 | |
* 必ず複製した物に対して行う事。 | |
* | |
* @example | |
* | |
* grunt.initConfig({ | |
* compile : { | |
* dist : [ "the/path/to/source.js" ] |