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 thunk = require('thunkify'); | |
var delay = thunk(function(cb) { | |
setTimeout(function() { | |
console.log('delay end'); | |
cb(); | |
}, 1000); | |
}); | |
var n = delay() |
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 co = require('co'); | |
var stack = [ | |
function *first(next) { // second generator | |
console.log('1 prev'); | |
yield next; // second に delegate | |
console.log('1 next'); | |
}, | |
function *second(next) { // third generator | |
console.log('2 prev'); |
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
<?php | |
class AAPP_JSONProvider extends ACMS_APP | |
{ | |
public $version = '0.1'; | |
public $name = 'ACMS JSON Provider'; | |
public $author = 'mu.aho'; | |
public $desc = 'a-blog cms のデータをJSON APIとして扱うための拡張です'; | |
/** | |
* インストールする前の環境チェック処理 |
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
none | |
Draw 0.3790s | |
Clip Rect 0.0030ms | |
Restore 0.0010ms | |
Save 0.0000ms | |
Other 0.0000ms | |
Total 0.3830 | |
dotted |
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 page = require('webpage').create(), | |
system = require('system'); | |
var url = system.args[1]; | |
page.viewportSize = { | |
width : system.args[2] || 1024, | |
height: system.args[3] || 768 | |
}; |
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
<!doctype html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title></title> | |
<meta name="description" content=""> |
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
'use strict'; | |
(function() { | |
/*jshint eqeqeq:false, maxparams:4 */ | |
var COND_OPERATORS = { | |
'==' : function (l, r) { return l == r; }, | |
'===': function (l, r) { return l === r; }, | |
'!=' : function (l, r) { return l != r; }, | |
'!==': function (l, r) { return l !== r; }, |
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
/* | |
* grunt-html5validator | |
* | |
* @author ahomu | |
*/ | |
module.exports = function(grunt) { | |
'use strict'; | |
var TEMP_HTTP_RESOURCE = '.h5v.http.tmp', |
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
/** | |
* Chikoque | |
* | |
* @author ahomu | |
*/ | |
(function(win, doc, _) { | |
'use strict'; | |
var defaults = { |
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
{ | |
"globals": { | |
"Backbone": true, | |
"_": true, | |
"$": true, | |
"jQuery": true, | |
"Zepto": true | |
}, | |
"maxlen": 100, |