Skip to content

Instantly share code, notes, and snippets.


Stefan Matsson smatsson

View GitHub Profile
View ThrottledStream2.cs
// source:
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)
View analyze-deployment-stats-from-octopus.js
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;