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 net = require('net'); | |
var sys = require('sys'); | |
// START setConnTimeout hack | |
net.Stream.prototype._orig_connect = net.Stream.prototype.connect; | |
net.Stream.prototype.connect = function () { | |
var self = this; | |
if (typeof self.conn_timeout !== 'undefined' && self.conn_timeout > 0) { | |
self.addListener('connect', function () { | |
clearTimeout(self.conn_timer); |
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
root 31098 0.0 0.5 15500 2180 pts/1 S 14:15 0:00 | \_ -bash | |
dan 31361 0.2 2.3 626500 8964 pts/1 Sl+ 15:08 0:00 | \_ node sandbox_it.js | |
[dan@arch-vm node-daemon-tools]$ curl http://127.0.0.1:8124/ | |
Hello World | |
Current directory: / | |
err: null | |
files: [ 'hello.js' ] |
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
[dan@m-box 834-327ffd51d202655c750101d7267a987d]$ git commit -m "Test whitespace." app.js | |
[master f7ed059] Test whitespace. | |
1 files changed, 1 insertions(+), 0 deletions(-) | |
[dan@m-box 834-327ffd51d202655c750101d7267a987d]$ git push | |
Counting objects: 5, done. | |
Delta compression using up to 2 threads. | |
Compressing objects: 100% (3/3), done. | |
Writing objects: 100% (3/3), 286 bytes, done. | |
Total 3 (delta 2), reused 0 (delta 0) | |
remote: Syncing repo with chroot |
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 o = /^.*$/; | |
> o | |
/^.*$/ | |
> o.concat | |
> o.concat('asdf') | |
TypeError: Object /^.*$/ has no method 'concat' | |
at [object Context]:1:3 | |
at Interface.<anonymous> (repl.js:171:22) | |
at Interface.emit (events.js:64:17) | |
at Interface._onLine (readline.js:153: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
// Converted to Javascript by Daniel Bartlett [DanBUK] <[email protected]> | |
// Source: http://en.wikibooks.org/wiki/Efficient_Prime_Number_Generating_Algorithms | |
var find_primes = function (max_prime) { | |
/* Get the square root of the upper limit. This will be the upper limit of the test prime array | |
for primes used to verify the primacy of any potential primes up to (max_prime). Primes greater than | |
(sqrtlim) will be placed in an array for extended primes, (xp), not needed for the verification | |
test. The use of an extended primes array is technically unnecessary, but helps to clarify that we | |
have minimized the size of the test prime array. | |
*/ |
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
#!/usr/bin/env node | |
var domain = 'www.example.com'; | |
var port = 80; | |
var ttpath = '/wp-content/themes/example/timthumb.php'; | |
var src_list = [ | |
'http://www.example.com/wp-content/uploads/2012/01/example.jpg', | |
'http://www.example.com/wp-content/uploads/2012/01/example1.jpg' | |
]; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <math.h> | |
/* Program does "big multiplication" | |
Should be able to handle numbers of _ANY_ length | |
Input via stdin:- | |
N |
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
typedef struct { | |
int size; | |
short *digits; | |
} IntArray; | |
typedef struct { | |
int size; | |
IntArray **arrays; | |
} IntArrayOfArray; |
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
#!/bin/env node | |
var NET = require('net'); | |
var ClientHandler = function (conn) { | |
this.bkspace = new Buffer([8,8,8]); | |
this._conn = conn; | |
this._running = true; | |
this._remoteAddress = this._conn.remoteAddress; | |
this._remotePort = this._conn.remotePort; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <pwd.h> | |
#define CONF_FILE "/etc/rsync_secure.conf" | |
typedef struct { |
OlderNewer