Skip to content

Instantly share code, notes, and snippets.

View msplival's full-sized avatar

Mario Splivalo msplival

  • Zagreb, Croatia
  • 00:54 (UTC +02:00)
View GitHub Profile
@msplival
msplival / mongodb_collection_sizes.js
Last active March 13, 2018 06:44 — forked from joeyAghion/mongodb_collection_sizes.js
List mongodb collections in descending order of size. Helpful for finding largest collections. First number is "size," second is "storageSize."
var mgo = db.getMongo()
function getReadableFileSizeString(fileSizeInBytes) {
var i = -1;
var byteUnits = [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB'];
do {
fileSizeInBytes = fileSizeInBytes / 1024;
i++;
} while (fileSizeInBytes > 1024);
#!/bin/bash -eux
# change this one if your gerrit remote user name is not the same as your
# shell user name
gerritusername=$USER
#gerritusername=mariosplivalo
repos=(
# supported charms as of 19.04 (https://docs.openstack.org/charm-guide/latest/1904.html#supported-charms)
charm-ceilometer-agent
charm-cinder