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 time(){ | |
var time = process.hrtime(); | |
return (time[0] * 1000) + (time[1] / 1000000); | |
} | |
var start = time(); | |
var tmp = []; | |
for (var i = 0; i < 10000; i++){ | |
tmp.push("test"); | |
} |
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
/** | |
* @file Functions relating to type validation. | |
*/ | |
module.exports = function(_){ | |
/** | |
* Check if value is an object, if not return an empty object | |
* | |
* @param {Object} obj |
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
╔═════════════════╦════════════╦═════════╦════════════╦════════════╦═════════╗ | |
║ ║ Monday ║ Tuesday ║ Wednesday ║ Thursday ║ Friday ║ | |
╠═════════════════╬════════════╬═════════╬════════════╬════════════╬═════════╣ | |
║ Morning ║ ║ ║ Radio ║ ║ ║ | |
║ (8:25-8:55) ║ ║ ║ ║ ║ ║ | |
╠═════════════════╬════════════╬═════════╬════════════╬════════════╬═════════╣ | |
║ Period 1 ║ Math ║ VCE IT ║ Philosophy ║ Literature ║ English ║ | |
║ (8:55 - 10:10) ║ VA2 ║ 306 ║ ║ ║ 206 ║ | |
╠═════════════════╬════════════╬═════════╬════════════╬════════════╬═════════╣ | |
║ Recess ║ ║ ║ Radio ║ ║ ║ |
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
uint64_t uv__hrtime(void) { | |
mach_timebase_info_data_t info; | |
if (mach_timebase_info(&info) != KERN_SUCCESS) | |
abort(); | |
return mach_absolute_time() * info.numer / info.denom; | |
} |
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
console.group("ahh"); // |- ahh | |
console.log("what"); // | what | |
console.log("ahh"); // | ahh | |
console.group("foo"); // |- foo | |
console.log("wtf"); // | wtf | |
console.groupEnd(); | |
console.log("foo"); // | foo | |
console.groupEnd(); |
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
/** | |
* @file Description | |
*/ | |
NYX(function(){ | |
$("[data-dynamic-data]").each(function(){ | |
var elem = $(this); | |
var name = elem.attr("data-dynamic-data"); | |
var id = elem.attr("data-id"); | |
var event = "dynamic-data " + name + " " + id; |
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
/** | |
* @file Description | |
*/ | |
/** | |
* Description | |
* | |
* @constructor | |
*/ |
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(){ | |
this.when('type', 'image', function(){ | |
this.validates('imageSource', { | |
required: true, | |
restrict: ['web', 'computer'] | |
}); | |
this.when('imageSource', 'web', function(){ | |
this.validates('imageUrl', { | |
alias: this.lang('submit#pictureUrl'), |
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
ul.buttons | |
clear-fix() | |
font-weight bold | |
> li | |
float left | |
position relative | |
.icon | |
position absolute |
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 check(host, callback){ | |
var dns = require('dns'); | |
var net = require('net'); | |
var blacklist = ['72.51.33.80']; | |
function resolved(err, ip){ | |
callback(!err && blacklist.indexOf(ip) !== -1); | |
} |