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 xml2js = require('xml2js'); | |
const fs = require('fs'); | |
const xmlFileName = 'deployments.xml'; | |
const environment = 'PROD'; | |
const year = '2019'; | |
xml2js.parseString(fs.readFileSync(xmlFileName), function (err, result) { | |
if (err) throw err; |
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
// source: https://stackoverflow.com/a/42133563 | |
public class ThrottledStream2 : Stream | |
{ | |
private readonly Stream parent; | |
private readonly int maxBytesPerSecond; | |
private readonly Stopwatch stopwatch; | |
private long processed; | |
public ThrottledStream2(Stream parent, int maxBytesPerSecond) |