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
/** | |
* example of configurable parallelism | |
*/ | |
// silly counter | |
var i = 0; | |
// configurable amount of work to run in parallel | |
var max = 1; |
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> | |
<html lang="en" dir="ltr"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Detecting Stylesheet Load Test</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
jQuery(function () { | |
var css = document.createElement('link'); | |
css.type = 'text/css'; |
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
// partial example | |
/** | |
folder structure | |
/views | |
- home.haml.html | |
/partials | |
- world.haml.html |
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 sys = require('sys'); | |
var uuid = function() { | |
var uuid = '', i; | |
for (i = 0; i < 32; i++) { | |
uuid += Math.floor(Math.random() * 16).toString(16); | |
} | |
return uuid; | |
}; | |
var a = {}, u, index=[]; |
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
From f4554917d120b994022ed261bdbd4268c476cc0e Mon Sep 17 00:00:00 2001 | |
From: Aaron Heckmann <aaron.heckmann@gmail.com> | |
Date: Wed, 16 Jun 2010 00:52:15 -0400 | |
Subject: [PATCH] fs.writeFile accepts Buffers | |
--- | |
lib/fs.js | 4 +++- | |
test/simple/test-fs-write-file.js | 21 ++++++++++++++++++++- | |
2 files changed, 23 insertions(+), 2 deletions(-) |
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
174.121.106.162 - - [23/Aug/2010 23:47:35] "GET /w00tw00t.at.blackhats.romanian.anti-sec:) HTTP/1.1" 404 113 0.0020 "-" "ZmEu" | |
21684 174.121.106.162 - - [23/Aug/2010 23:47:35] "GET /scripts/setup.php HTTP/1.1" 404 113 0.0000 "-" "ZmEu" | |
21685 174.121.106.162 - - [23/Aug/2010 23:47:35] "GET /admin/scripts/setup.php HTTP/1.1" 404 113 0.0000 "-" "ZmEu" | |
21686 174.121.106.162 - - [23/Aug/2010 23:47:35] "GET /admin/pma/scripts/setup.php HTTP/1.1" 404 113 0.0000 "-" "ZmEu" | |
21687 174.121.106.162 - - [23/Aug/2010 23:47:35] "GET /admin/phpmyadmin/scripts/setup.php HTTP/1.1" 404 113 0.0010 "-" "ZmEu" | |
21688 174.121.106.162 - - [23/Aug/2010 23:47:35] "GET /db/scripts/setup.php HTTP/1.1" 404 113 0.0000 "-" "ZmEu" | |
21689 174.121.106.162 - - [23/Aug/2010 23:47:35] "GET /dbadmin/scripts/setup.php HTTP/1.1" 404 113 0.0000 "-" "ZmEu" | |
21690 174.121.106.162 - - [23/Aug/2010 23:47:35] "GET /myadmin/scripts/setup.php HTTP/1.1" 404 113 0.0000 "-" "ZmEu" | |
21691 174.121.106.162 - - [23/Aug/2010 23:47:35] "GET /mysql/scripts/setup.php HTT |
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
fn1( | |
{ key: 1 | |
, bar: 2 | |
, baz: 3 | |
} | |
) | |
fn2({ | |
foo: 1 | |
, bar: 2 |
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
process.on('SIGINT', function(){ | |
console.log('bye'); | |
process.exit(0); | |
}); | |
setTimeout(function(){}, 4000); |
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 start = new Date; | |
var times = 2; | |
var i = 0; | |
for (; i < times; ++i) { | |
var num = 1000; | |
while (num--) { | |
require('./'+num); |
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 index; | |
function test (method) { | |
index = 0; | |
var start = new Date; | |
var i = 1000000; | |
while (--i) method(); | |
console.log(new Date - start); | |
} |
OlderNewer