This file contains hidden or 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 http = require('http'); | |
| var url = require('url'); | |
| var proxy = http.createServer(function(req, res) { | |
| var request = url.parse(req.url); | |
| options = { | |
| host: request.hostname, | |
| port: request.port || 80, | |
| path: request.path, | |
| method: req.method, |
This file contains hidden or 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
| rabbitmqadmin list queues | cut -d '|' -f 3 | grep -v \+ | xargs -n1 -I@ rabbitmqadmin purge queue name=@ |
This file contains hidden or 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 bulk = db.testkdd.initializeOrderedBulkOp(), | |
| count = 0; | |
| // List "all" fields that make a document "unique" in the `_id` | |
| // I am only listing some for example purposes to follow | |
| db.testkdd.aggregate([ | |
| { "$group": { | |
| "_id": { | |
| "duration" : "$duration", | |
| "protocol_type": "$protocol_type", |