This file contains hidden or 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
| /** | |
| * Auto Update | |
| * These anonymous functions extends specific object automatically. | |
| */ | |
| (function( Update ){ | |
| try{ | |
| // Succeed to wic properties and methods. | |
| // But some of them are overridden. | |
| Update.prototype = wic; | |
| } catch( e ){ |
This file contains hidden or 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
| /** | |
| * Require file | |
| * | |
| * option object has | |
| * { | |
| * url : string || array || object | |
| * error : function | |
| * done : function | |
| * loaded : function | |
| * async : true || false |
This file contains hidden or 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 createCalendar( year, month ){ | |
| var calendarArray = []; | |
| var weekdayStrArray = [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ]; | |
| var monthStrArray = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ]; | |
| var monthArray = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ]; | |
| var monthDay = monthArray[ month - 1 ]; | |
| var currentDay = ( new Date( year, ( month - 1 ), 1, 0, 0, 0 ) ).getDay(); | |
| if( month == 2 ) | |
| monthDay += year % 4 ? 0 : year % 100 ? 1 : year % 400 ? 0 : 1; |
This file contains hidden or 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 automaton = { | |
| current: { | |
| state: 0 | |
| } | |
| , defaults: { | |
| state: 0 | |
| } | |
| , transition: [ |
This file contains hidden or 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
| // Using void | |
| void function(){ | |
| console.log( 'hello' ); | |
| }(); | |
| // Using ! | |
| !function(){ | |
| console.log( 'yes' ); | |
| }(); |
This file contains hidden or 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 str_1 = ''' | |
| Good | |
| morning, | |
| world. | |
| '''; | |
| var str_2 = """ | |
| Good | |
| night, | |
| world. |
This file contains hidden or 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
| /** | |
| * start.app.js | |
| * | |
| * Application starter. Will use it on my website :) | |
| * | |
| * @author Saneyuki Tadokoro (@Saneyan or @jSaneyan) <post@saneyuki.gfunction.com> | |
| */ | |
| // | |
| // Use strict mode |
This file contains hidden or 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 wic = wic || {}; | |
| wic.Module = function(){ | |
| var _id | |
| , _detail | |
| , _children = {}; | |
| /* | |
| * @param object destination |
This file contains hidden or 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
| ### | |
| CoffeeScript Tests for ME! | |
| I found CoffeeScript is very very simple... | |
| @author Saneyuki Tadokoro (@Saneyan or @jSaneyan) <post@saneyuki.gfunction.com> | |
| ### | |
| # | |
| # Util |
This file contains hidden or 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 mongoose = require( 'mongoose' ); | |
| var db = mongoose.createConnection( 'mongoose://localhost/test' ); | |
| db.on( 'error', function( err ){ | |
| console.log( err ); | |
| }); | |
| db.once( 'open', function(){ | |
| var Schema = mongoose.Schema; |
OlderNewer