-
-
Save kaissi/1660920fd1ec1ffa2cdd0f415af0ab5a to your computer and use it in GitHub Desktop.
Revisions
-
TooTallNate revised this gist
Apr 29, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -24,7 +24,7 @@ var server = http.createServer(function (req, res) { // log console.log(req.headers['user-agent']) // hack to thread stdin and stdout // simultaneously in curl's single thread var iv = setInterval(function () { res.write(buf0) -
TooTallNate revised this gist
Mar 28, 2012 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -17,6 +17,7 @@ var server = http.createServer(function (req, res) { , input: req , output: res , terminal: false , useColors: true , useGlobal: false }) -
TooTallNate revised this gist
Mar 26, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -14,8 +14,8 @@ var server = http.createServer(function (req, res) { res.write('Welcome to the Fun House\r\n') repl.start({ prompt: 'curl repl> ' , input: req , output: res , terminal: false , useGlobal: false }) -
TooTallNate revised this gist
Mar 26, 2012 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,8 @@ var server = http.createServer(function (req, res) { res.write('Welcome to the Fun House\r\n') repl.start({ prompt: 'curl repl> ' , input: req, , output: res, , terminal: false , useGlobal: false }) -
TooTallNate revised this gist
Mar 26, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ var server = http.createServer(function (req, res) { repl.start({ prompt: 'curl repl> ' , socket: { stdin: req , stdout: res } , terminal: false , useGlobal: false }) -
TooTallNate revised this gist
Mar 26, 2012 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,5 @@ /** * Requires node v0.7.7 or greater. * * To connect: $ curl -sSNT. localhost:8000 */ -
TooTallNate revised this gist
Mar 16, 2012 . 2 changed files with 52 additions and 32 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,27 +1,36 @@ /** * Currently requires my tty-readline-migration branch: * https://github.com/TooTallNate/node/compare/tty-readline-migration * * To connect: $ curl -sSNT. localhost:8000 */ var http = require('http') , repl = require('repl') , buf0 = new Buffer([0]) var server = http.createServer(function (req, res) { res.setHeader('content-type', 'multipart/octet-stream') res.write('Welcome to the Fun House\r\n') repl.start({ prompt: 'curl repl> ' , socket: { stdin: req , stdout: res } , enabled: false , useGlobal: false }) // log console.log(req.headers['user-agent']) // hack to thread stdin and stdout in // simultaneously in curl's single thread var iv = setInterval(function () { res.write(buf0) }, 100) res.connection.on('end', function () { clearInterval(iv) }) }) server.listen(8000) 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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,19 @@ ☮ ~ (master) ⚡ curl -sSNT. localhost:8000 Welcome to the Fun House curl repl> process.platform 'darwin' curl repl> process.arch 'x64' curl repl> process.cwd() '/Users/nrajlich' curl repl> path { resolve: [Function], normalize: [Function], join: [Function], relative: [Function], dirname: [Function], basename: [Function], extname: [Function], _makeLong: [Function] } curl repl> ^C ☮ ~ (master) ⚡ -
James Halliday revised this gist
Oct 17, 2011 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ substack : http-bbs $ curl -sSNT. localhost:8000 Welcome to the Fun House > beep beep > boop boop > ^C substack : http-bbs $ -
James Halliday created this gist
Oct 17, 2011 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ var http = require('http'); var buf0 = new Buffer([0]); var server = http.createServer(function (req, res) { res.setHeader('content-type', 'multipart/octet-stream'); res.write('Welcome to the Fun House\r\n'); res.write('> '); req.on('data', function (buf) { res.write(buf); res.write('> '); }); req.on('end', function () { res.end(); }); console.log(req.headers['user-agent']); var iv = setInterval(function () { res.write(buf0); }, 100); res.connection.on('end', function () { clearInterval(iv); }); }); server.listen(8000);