Skip to content

Instantly share code, notes, and snippets.

View davidmfoley's full-sized avatar

Dave Foley davidmfoley

View GitHub Profile
.
├── actions
├── stores
├── views
│   ├── Anonymous
│   │   ├── __tests__
│   │   ├── views
│   │   │   ├── Home
│   │   │   │   ├── __tests__
│   │   │   │   └── Handler.js
@davidmfoley
davidmfoley / README.md
Last active August 29, 2015 14:11 — forked from porjo/README.md

Forked from: https://gist.github.com/mmoulton/6224509

Docker stats collection for collectd

This script can be used to feed collectd with cpu and memory usage statistics for running docker containers using the collectd exec plugin.

This script will report the used and cached memory as well as the user and system cpu usage by inspecting the appropriate cgroup stat file for each running container.

Usage

@davidmfoley
davidmfoley / gist:3041435
Created July 3, 2012 18:04 — forked from re5et/gist:3036720
JavaScript Window global var differ.
var Differ = function(thing){
this.thing = thing;
};
Differ.prototype.cacheVars = function(){
this.cache = {};
for(var prop in this.thing){
this.cache[prop] = this.thing[prop];
}
};