View gist:9181766
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 bbb(x) { | |
var cc = x + 1; | |
var dd = cc + 2; | |
debugger; | |
return dd; | |
} | |
setInterval(function() { | |
var aa = 123; | |
//debugger; |
View gist:9245108
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 encode(data) { | |
var chunk = data.toString(); | |
return chunk.length.toString(16) + "\r\n" + chunk + "\r\n"; | |
} | |
var server = new HTTP.Server("localhost", 8000); | |
server.onRequest = function (request) { | |
log( "path: " + request.path ); | |
log( "query string: " + request.query_string ); |
View node.js
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 encode(data) { | |
var chunk = data.toString(); | |
return chunk.length.toString(16) + "\r\n" + chunk + "\r\n"; | |
} | |
var server = new HTTP.Server("localhost", 8000); | |
server.onRequest = function (request) { | |
log( "path: " + request.path ); | |
log( "query string: " + request.query_string ); |
View tcp.js
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
TCP.connect ({ | |
host: "google.com", | |
port: 80, | |
connected: function () { | |
log("connected to google.com"); | |
} | |
}); |
View gist:9316508
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
### Keybase proof | |
I hereby claim: | |
* I am sidorares on github. | |
* I am sidorares (https://keybase.io/sidorares) on keybase. | |
* I have a public key whose fingerprint is 4899 77FC 876C 35BE 2738 875A 93C1 A8CE 1680 0045 | |
To claim this, I am signing this object: |
View with nm.txt
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
Statistical profiling result from v8-3.22.24.19.log, (91 ticks, 0 unaccounted, 0 excluded). | |
[Shared libraries]: | |
ticks total nonlib name | |
45 49.5% 0.0% /usr/local/bin/node | |
10 11.0% 0.0% [vdso] | |
2 2.2% 0.0% /lib/i386-linux-gnu/libc-2.15.so | |
[JavaScript]: | |
ticks total nonlib name |
View gist:c5f50511918010358820
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
> x11@0.10.0 test /tmp/node-x11 | |
> node test-runner.js | |
Atoms and atom names cache | |
✓ should be used directly when requesting std atoms with InternAtom | |
✓ should be used directly when requesting atom names with GetAtomName | |
✓ should be used after the first request for non-std atoms | |
✓ should be used after the first request for non-std atom_names |
View launcher-test.desktop
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
[Desktop Entry] | |
Name=Unity Launcher test | |
GenericName=Oooooooooooooooooooooooooooo | |
Comment=Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | |
Exec=/home/laplace/ltest/test.js | |
Icon=system-software-update | |
Terminal=false | |
Type=Application | |
Categories=System;Settings; |
View set-icon.js
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 x11 = require('x11'); | |
var PNG = require('png-js'); | |
var bl = require('bl'); | |
require('child_process').exec('locate png | grep 48').stdout.pipe(bl(function(err, files) { | |
var pngNames = files.toString().split('\n'); | |
var pngIndex = 0; | |
x11.createClient(function(err, display) { |
View aseba.js
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['ch.epfl.mobots.AsebaNetwork'] = function(bus) { | |
this.addListener = this.on = function(signame, callback) { | |
bus.addMatch('type=\'signal\',member=\'' + signame + '\'', function(err, result) { | |
if (err) throw new Error(err); | |
}); | |
var signalFullName = bus.mangle('/', 'ch.epfl.mobots.AsebaNetwork', signame); | |
bus.signals.on(signalFullName, function(messageBody) { | |
callback.apply(null, messageBody); | |
}); | |
}; |
OlderNewer