Skip to content

Instantly share code, notes, and snippets.

View ChrisSnake's full-sized avatar

Christoph Jost ChrisSnake

  • ZAIDOO - Hier zählst Du! (@zaidoo-de)
  • Dortmund, Germany
View GitHub Profile
@ChrisSnake
ChrisSnake / cpu.js
Created April 30, 2018 18:09 — forked from bag-man/cpu.js
How to calculate the current CPU load with Node.js; without using any external modules or OS specific calls.
var os = require("os");
//Create function to get CPU information
function cpuAverage() {
//Initialise sum of idle and time of cores and fetch CPU info
var totalIdle = 0, totalTick = 0;
var cpus = os.cpus();
//Loop through CPU cores
@ChrisSnake
ChrisSnake / tmux-cheatsheet.markdown
Created May 21, 2018 21:16 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ChrisSnake
ChrisSnake / ultimate-ut-cheat-sheet.md
Created June 4, 2018 20:10 — 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