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> | |
<meta charset="UTF-8"> | |
<title>debug - Mithril.js</title> | |
<script src="mithril.min.js"></script> | |
<!--[if IE]><script src="es5-shim.min.js"></script><![endif]--> | |
<body> | |
<div id="$debugElement"></div> | |
</body> |
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> | |
<meta charset="UTF-8"> | |
<title>links - Mithril.js</title> | |
<script src="mithril.min.js"></script> | |
<!--[if IE]><script src="es5-shim.min.js"></script><![endif]--> | |
<body> | |
<div id="$linksElement"></div> | |
</body> |
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> | |
<meta charset="UTF-8"> | |
<title>counter minimum - Mithril.js</title> | |
<script src="mithril.min.js"></script> | |
<!--[if IE]><script src="es5-shim.min.js"></script><![endif]--> | |
<body></body> | |
<script> |
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 target; | |
target: for (;;) switch (target) { | |
case undefined: | |
console.log('init'); | |
case 'start': | |
console.log('start'); |
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
'use strict'; | |
var aa = require('aa'); | |
var Channel = aa.Channel; | |
var get = require('./get'); | |
aa(function*() { | |
var ch = Channel(); | |
get('a.txt', ch); |
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
if ('proxy-connection' in cliReq.headers) { | |
cliReq.headers['connection'] = cliReq.headers['proxy-connection']; | |
delete cliReq.headers['proxy-connection']; | |
delete cliReq.headers['cache-control']; | |
} |
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
const http = require('http'), url = require('url'); | |
http.createServer((cliReq, cliRes) => { | |
const x = url.parse(cliReq.url); | |
const opt = {host: x.hostname, port: x.port || 80, path: x.path, | |
method: cliReq.method, headers: cliReq.headers}; | |
const svrReq = http.request(opt, svrRes => { | |
cliRes.writeHead(svrRes.statusCode, svrRes.headers); | |
svrRes.pipe(cliRes); }); | |
cliReq.pipe(svrReq); | |
}).listen(8080); |
NewerOlder