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
res.writeHead(200); | |
var i = 0; | |
var interval = setInterval(function () { | |
res.write('line ' + i++ + '\n') | |
if (3 === i) { | |
clearInterval(interval) | |
res.end() | |
} | |
}, 1000) |
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 http = require('http'); | |
//http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World\n'); | |
//}).listen(1337, "127.0.0.1"); | |
//console.log('Server running at http://127.0.0.1:1337/'); |
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
res.writeHead(200) | |
res.end('Hello, world!') |
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 tls = require('tls') | |
console.log(tls) | |
res.writeHead(200) | |
res.end() |
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
res.writeHead(200) | |
res.end('Hello, world') |
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
(function () { | |
// refactor process.argv to determine the app entry point and remove the interceptor | |
var appFile; | |
var newArgs = []; | |
process.argv.forEach(function (item, index) { | |
if (index === 2) | |
appFile = item; | |
if (index !== 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
var path = require('path') | |
, fs = require('fs'); | |
var existsSync = fs.existsSync || path.existsSync; | |
var nodejsDir = path.resolve(process.env['programfiles(x86)'] || process.env['programfiles'], 'nodejs'); | |
if (!existsSync(nodejsDir)) | |
throw new Error('Unable to locate node.js installation directory at ' + nodejsDir); | |
var wwwroot = process.argv[2]; |
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 channel = '{channel_url}'; | |
var currentAccessToken; | |
wns.sendToastImageAndText02( | |
channel, | |
{ | |
image1src: 'http://foobar.com/dog.jpg', | |
image1alt: 'A dog', | |
text1: 'This is a dog', | |
text2: 'The dog is nice' |
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
scenario | |
{ | |
name = "default"; | |
warmup = 5; | |
duration = 10; | |
cooldown = 5; | |
default | |
{ |
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
//#r "System.dll" | |
//#r "System.Data.dll" | |
//#r "System.Web.Extensions.dll" | |
using System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.Data.SqlClient; | |
using System.IO; | |
using System.Text; |