Skip to content

Instantly share code, notes, and snippets.

Juan Fernández juanantoniofj

Block or report user

Report or block juanantoniofj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
juanantoniofj / cadvisor.service
Created Feb 15, 2019
View cadvisor.service
# /etc/systemd/system/cadvisor.service
Description=cAdvisor monitor
ExecStart=/usr/bin/docker run --name cadvisor -v /:/rootfs:ro -v /dev/disk:/dev/disk:ro -v /overlay:/overlay:rw -v /var/run:/var/run:ro -v /sys:/sys:ro -p 10080:8080
ExecStop=/usr/bin/docker rm -f cadvisor
ExecReload=/usr/bin/docker rm -f cadvisor
juanantoniofj / average.js
Created Feb 11, 2014
Measure average execution time for functions.
View average.js
Function.prototype.avg = function() {
var avg = 0;
var r = 5;
for (var i = 0; i < r; i++) {
var begin = new Date();
this.apply(this, arguments);
avg += (new Date() - begin);
return avg / r;
You can’t perform that action at this time.