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
const pendingTimers = []; | |
const pendingOSTasks = []; | |
const pendingOperations = []; | |
// New timers, tasks, operations are recorded from myFile running | |
myFile.runContents(); | |
function shouldContinue() { | |
// Check one: Any pending setTimeout, setInterval, setImmediate? | |
// Check two: Any pending OS tasks? (Like server listening to port) |
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
import * as mongoose from 'mongoose'; | |
export let Schema = mongoose.Schema; | |
export let ObjectId = mongoose.Schema.Types.ObjectId; | |
export let Mixed = mongoose.Schema.Types.Mixed; | |
export interface IHeroModel extends mongoose.Document { | |
name: string; | |
power: string; |
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 amqp = require('amqplib/callback_api'); | |
// if the connection is closed or fails to be established at all, we will reconnect | |
var amqpConn = null; | |
function start() { | |
amqp.connect(process.env.CLOUDAMQP_URL + "?heartbeat=60", function(err, conn) { | |
if (err) { | |
console.error("[AMQP]", err.message); | |
return setTimeout(start, 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 EXTRA_FILES = [ | |
"/xjs/_/js/k=xjs.ntp.en_US.avfLKzXx4YU.O/m=jsa,ntp,d,csi/am=ig/rt=j/d=1/t=zcms/rs=ACT90oFEy3lvnukSCk3QiMKs2eguQ14CaA", | |
]; | |
var CHECKSUM = "mk2or3"; | |
var BLACKLIST = [ | |
'/gen_204\?', | |
'/async/', | |
]; |
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
## Ignore Visual Studio temporary files, build results, and | |
## files generated by popular Visual Studio add-ons. | |
# User-specific files | |
*.suo | |
*.user | |
*.userosscache | |
*.sln.docstates | |
# User-specific files (MonoDevelop/Xamarin Studio) |
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
http://blog.wolksoftware.com/setting-up-your-typescript-vs-code-development-environment |
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
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "0.1.0", | |
"command": "tsc", | |
"isShellCommand": true, | |
"args": [ | |
"--target","ES5", | |
"--outDir", "js", | |
"--module","commonjs", |
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
{ | |
// Use IntelliSense to learn about possible Node.js debug attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Launch Program", |
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
{ | |
"compilerOptions": { | |
"target": "es5", | |
"outDir": "js", | |
"module": "commonjs", | |
"sourceMap": true, | |
"watch": true | |
}, | |
"files": [ | |
"app.ts" |
NewerOlder