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
/* | |
For a MongoDB collection, this function turns a nested document | |
into an update to another document, identifying array elements | |
by a "_id" field. | |
For example, given this original document: | |
{ | |
"_id" : 1, |
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
#!/usr/bin/python | |
# throdel.py -- perform a throttled delete on a MongoDB collection | |
# Author: Andre Spiegel | |
from pymongo import MongoClient | |
from time import sleep | |
import argparse | |
import json |
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
#!/usr/bin/python | |
# Patches a mongoDB automation configuration to create a new replica set. | |
# By default, it modifies the file config.json in the current directory, | |
# saving the original state of that file in config.json.org. You can | |
# specify a different file to modify using the --file option. | |
# Author: Andre Spiegel <andre.spiegel@mongodb.com> | |
import json |
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
### Keybase proof | |
I hereby claim: | |
* I am drmirror on github. | |
* I am drmirror (https://keybase.io/drmirror) on keybase. | |
* I have a public key whose fingerprint is 2CB0 A5F7 B74F 02CA 119E 00ED E26B 6A93 4587 B69D | |
To claim this, I am signing this object: |