Skip to content

Instantly share code, notes, and snippets.

View Luxcium's full-sized avatar
:octocat:
Full-time TypeScript worshiper, Node.JS enthusiast and VsCode junkie.

Benjamin Vincent Luxcium

:octocat:
Full-time TypeScript worshiper, Node.JS enthusiast and VsCode junkie.
  • Luxcium
  • Québec, Qc, Canada
  • X @Luxcium
View GitHub Profile
@Luxcium
Luxcium / load-generator.js
Created September 6, 2021 21:22 — forked from tkrueger/load-generator.js
generate and measure CPU load with node.js
#!/usr/bin/env node
require(__dirname+"/processor-usage.js").startWatching();
var shouldRun = true;
var desiredLoadFactor = .5;
function blockCpuFor(ms) {
var now = new Date().getTime();
var result = 0
@Luxcium
Luxcium / ultimate-ut-cheat-sheet.md
Last active September 12, 2020 13:13 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies