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
| // in REPL | |
| var exec = require('child_process').exec; | |
| var child; | |
| var uid = 123; | |
| child = exec('id -u root', function(error, stdout, stderr) { | |
| uid = parseInt(stdout, 10); |
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
| Quad core Q6600, 4GB ram, WD 10k RPM raptor disc | |
| Wrote 104857800 bytes in 6915ms using 1024 byte buffers: 14.461315979754156 mB/s | |
| Wrote 104857800 bytes in 5430ms using 4096 byte buffers: 18.41620626151013 mB/s | |
| Wrote 104857800 bytes in 3722ms using 8192 byte buffers: 26.867275658248253 mB/s | |
| Wrote 104857800 bytes in 2919ms using 16384 byte buffers: 34.258307639602606 mB/s | |
| Wrote 104857800 bytes in 3016ms using 32768 byte buffers: 33.15649867374005 mB/s | |
| Wrote 104857800 bytes in 7362ms using 65536 byte buffers: 13.583265417006247 mB/s | |
| ---- |
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
| ../src/msgpack.cc:201: error: ‘mo’ was not declared in this scope | |
| ../src/msgpack.cc:201: error: expected ‘,’ or ‘;’ before ‘{’ token | |
| Waf: Leaving directory `/home/mape/.node_libraries/node-msgpack/build' | |
| Build failed: -> task failed (err #1): | |
| {task: cxx msgpack.cc -> msgpack_1.o} | |
| make: *** [msgpack] Error 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
| node> var connect = require('connect') | |
| node> var sys = require('sys'); | |
| node> sys.puts(sys.inspect(connect)) | |
| { version: '0.2.1' | |
| , Server: { [Function] super_: { [Function] super_: [Object] } } | |
| , createServer: [Function] | |
| } |
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
| [55/69] cxx: src/node_net.cc -> build/default/src/node_net_4.o | |
| /usr/bin/g++ -DHAVE_OPENSSL=1 -DEV_MULTIPLICITY=0 -pthread -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_FDATASYNC=1 -DPLATFORM=linux -DNDEBUG -g -O3 -Idefault/src -I../src -Idefault/deps/libeio -I../deps/libeio -Idefault/deps/http_parser -I../deps/http_parser -Idefault/deps/v8/include -I../deps/v8/include -Idefault/deps/libev -I../deps/libev -Idefault/deps/c-ares -I../deps/c-ares -Idefault/deps/c-ares/linux-x86_64 -I../deps/c-ares/linux-x86_64 -Ideps/v8/include ../src/node_net.cc -c -o default/src/node_net_4.o | |
| ../src/node_net.cc: In function ‘v8::Handle<v8::Value> node::GetSockName(const v8::Arguments&)’: | |
| ../src/node_net.cc:401: error: ‘struct sockaddr_un’ has no member named ‘sun_len’ | |
| ../src/node_net.cc:401: error: ‘struct sockaddr_un’ has no member named ‘sun_len’ | |
| ../src/node_net.cc: In function ‘v8::Handle<v8::Value> node::GetPeerName(const v8::Arguments&)’: | |
| ../src/node_net.cc:423: error: ‘struct sockaddr_un’ has no member named ‘sun_len’ |
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 userIds = []; | |
| // Create dummy ids | |
| for (var i=0; i < 10000; i++) { | |
| userIds.push('id-'+new Date().getTime()+Math.random()*100000000000000000+''+(Math.random()*100000000000000000)+''+(Math.random()*100000000000000000)); | |
| }; | |
| // Populate array with ids and users attached | |
| var usersArr = [] | |
| for (var i=0,l=users.length; i < l; i++) { |
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
| // Find: id-127948013911961470649950206280740122937131673124230331368744372 | |
| // Array | |
| { id: 'id-127948013911961470649950206280740122937131673124230331368744372' | |
| , name: 'mape-id-127948013911961470649950206280740122937131673124230331368744372' | |
| } | |
| // Fetch using array: 30ms | |
| // Object | |
| { name: 'mape-id-127948013911961470649950206280740122937131673124230331368744372' } |
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
| npm it worked if it ends with ok | |
| npm configfile /home/mape/.npmrc | |
| npm cli [ 'ls', 'installed' ] | |
| npm version 0.1.20 | |
| npm GET / | |
| npm ok | |
| npm it worked if it ends with ok | |
| npm configfile /home/mape/.npmrc | |
| npm cli [ 'install' | |
| , '[email protected]' |
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 app = module.exports = Express.createServer(); | |
| app.configure(function() { | |
| app.set('view engine', 'ejs'); | |
| app.set('views', __dirname + '/views'); | |
| app.set('reload views', 1000); | |
| }); | |
| app.configure(function() { | |
| app.use(connect.conditionalGet()); |
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
| {"http://www.apple.com/magictrackpad/":true} {"key":"urlCache"} | |
| {} {"key":"pageCache"} | |
| [] {"key":"contentCache"} | |
| {"key":"urlCache"} | |
| {"http://www.apple.com/magictrackpad/":"www.apple.com/magictrackpad/","http://tinyurl.com/28l33rg":true} {"key":"urlCache"} | |
| {"key":"pageCache"} | |
| {"www.apple.com/magictrackpad/":{"count":1,"tweet":{"text":"Apple launches Magic Trackpad http://www.apple.com/magictrackpad/","name":"M. Gong","screen_name":"yobosensei","profile_image_url":"http://a0.twimg.com/profile_images/307619236/profile_normal.jpg","created_at":"a min ago"},"added":1280247061000,"tweeters":["yobosensei"],"title":"Apple - Magic Trackpad - The Multi-Touch trackpad for your desktop."}} {"key":"pageCache"} | |
| {"key":"contentCache"} | |
| [] {"key":"contentCache"} | |
| {"key":"urlCache"} |