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 http = require('http'); | |
var sys = require('sys'); | |
var exec = require('child_process').exec; | |
var util = require('util'); | |
var fs = require('fs'); | |
http.createServer(function(request, response) { | |
var dummyContent = '<!doctype html><html><head><title>Test</title><meta charset="utf-8"></head><body><p>Hello world!</p></body></html>'; | |
var htmlFileName = "page.html", pdfFileName = "page.pdf"; | |
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 net = require('net'); | |
var client = net.connect({port: 8000}, function() { | |
console.log('Client connected.'); | |
client.write('Hello from Node!'); | |
}); | |
client.on('data', function(data) { | |
console.log(data.toString()); | |
client.end(); |
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
(function(GYG) { | |
"use strict"; | |
function EventTracker() { | |
this.config = { | |
_server : 'http://pony1:9001/' | |
}; | |
} | |
/** |
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
/** | |
* Function for generating ESR-numbers for orange swiss payment slips (so called "Oranger Einzahlungsschein"). | |
* | |
* @author Jason Rubichi, Nicolas Zanotti | |
* @param | |
* bc: fix, 01 or 04 | |
* chf: dynamic, amount in chf without rappen, must have eight chars minimum (if less than eight chars, insert zeros before) | |
* rappen: dynamic, amount in rappen | |
* help1, help2, help3: fix, "+" or ">", no editing required | |
* referenceNumber: dynamic, contains matag number, zeros, client number and job number |
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
import randomlyAssignPeopleToEachOther, { filterExclusions, filterOwnName, filterSelections, orderByPossibleSelections } from "./random-assignment.ts"; | |
const describe = (name:string, fn:Function) => console.log(`${name}:`) + fn(); | |
const test = (name:string, fn:Function) => console.log(`\t• ${name}:`, fn()); | |
describe( | |
'Filtering data of type Person.', | |
() => { | |
test( | |
'It does not select the same person as giver and receiver.', |