This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# File: pingi | |
# | |
# Purpose: Ping Improved. Actually just handles better the timeout/unreachable. | |
# | |
# Author: BRAGA, Bruno <[email protected]> | |
# | |
# Copyright: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var async = require('async') | |
var _ = require('underscore') | |
var Helpers = function(mongoose) { | |
this.mongoose = mongoose || require('mongoose') | |
this.dropCollections = function(callback) { | |
var collections = _.keys(mongoose.connection.collections) | |
async.forEach(collections, function(collectionName, done) { | |
var collection = mongoose.connection.collections[collectionName] |