Skip to content

Instantly share code, notes, and snippets.

@mikecroucher
mikecroucher / 0_reuse_code.js
Created July 12, 2017 12:35
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Average CPU job: 4900 seconds

$ awk -F: '{print $35, $37}' 1percent | awk '{a+=$2};END{print a/NR}'
4852.23

Average number of cores, per CPU second

awk -F: '{print $35, $37}' 1percent | awk '{p+=$1*$2;a+=$2}; END {print p/a}'