Skip to content

Instantly share code, notes, and snippets.

View follmann's full-sized avatar

Andreas Follmann follmann

View GitHub Profile
@follmann
follmann / mongo-functions.js
Last active October 13, 2015 12:08 — forked from loopj/mongo-functions.js
Useful Mongo Shell Functions
DB.prototype.getCurrentOpStats = function() {
intervals = [1,5,10,30]
waitingForLock = 0;
secsRunningStats = {};
inProg = db.currentOp()["inprog"]
inProg.forEach(function (op) {
if(op["waitingForLock"]) {
waitingForLock += 1;
}
@follmann
follmann / rbenv-install-system-wide.sh
Created February 14, 2012 21:36 — forked from v1nc3ntlaw/rbenv-install-system-wide.sh
rbenv install on Debian 6 Squeeze
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core curl
apt-get -y install libssl-dev
apt-get -y install libreadline5 libreadline5-dev
apt-get -y install zlib1g zlib1g-dev
# for passenger needed
@follmann
follmann / rvm2rbenv.txt
Created February 9, 2012 18:12 — forked from brentertz/rvm2rbenv.txt
Switch from RVM to RBENV
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################