├── .gitignore ├── 2dsphere ├── .gitignore ├── README.md ├── config.yml.sample ├── data │ ├── ny-lines.json │ ├── ny-nodes.json │ ├── ny-polygons.json │ ├── osm2gj.py │ ├── sf-lines.json │ ├── sf-nodes.json │ └── sf-polygons.json ├── requirements.txt ├── static │ ├── images │ │ ├── point.gif │ │ └── point.png │ └── js │ │ ├── jquery-1.8.3.min.js │ │ └── mapstest.js ├── templates │ └── mapstest.html └── www.py ├── README ├── cpp ├── eatmem.cpp ├── fsyncappendtest.cpp └── tailable_cursor.cpp ├── embedded ├── README ├── build.bat ├── build.sh ├── embedded.cpp ├── embedded.h └── helloworld.cpp ├── java └── Test.java ├── js ├── amb.js ├── arrayIndexing.js ├── blog.js ├── commitlatency.js ├── compact-example.js ├── fixedArray.js ├── insert_speed_test.js ├── jitter.js ├── many_collections.js ├── opsbyip.js ├── read_speed_test.js ├── replsetspeed.js ├── tailed.js └── voting.js ├── jslib-sconstruct ├── mongo-ldap ├── README.md └── mongo-ldap.rb ├── mongodb-graphson ├── .gitignore ├── README.md ├── javascript │ ├── export-graphson.js │ ├── load-graphson.js │ └── test.txt ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── mongodb │ │ └── graph │ │ ├── DuplicateMode.java │ │ ├── GraphSON.java │ │ ├── GraphSONReader.java │ │ ├── GraphSONTool.java │ │ ├── GraphSONWriter.java │ │ ├── JSONGraphListener.java │ │ └── MongoDBListener.java │ └── test │ ├── java │ └── org │ │ └── mongodb │ │ └── graph │ │ ├── GraphSONExportTest.java │ │ └── GraphSONImportTest.java │ └── resources │ ├── embedded-graph.json │ ├── extended-graph.json │ ├── modified-graph.json │ └── simple-graph.json ├── perf └── disk.cpp ├── py ├── analytics.py ├── debug.py ├── queue.py ├── readbsonfile.py └── taillog.py ├── replication ├── driver_test │ ├── README │ ├── driver_replset_test.js │ ├── runner.py │ ├── test.php │ ├── test.py │ └── test.rb ├── misc.js ├── repl_info.py ├── repl_info.rb ├── simple-setup.py ├── test_latency.js └── tl.bat ├── sharding ├── chunk-checker.js ├── count_objects.js ├── first.js ├── first.py ├── multi_split.js └── simple-setup.py └── vs2010 ├── README ├── js.sln ├── js.vcxproj ├── jskwgen └── jskwgen.vcxproj └── snippets └── snippets.sln /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | -------------------------------------------------------------------------------- /2dsphere/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/2dsphere/.gitignore -------------------------------------------------------------------------------- /2dsphere/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/2dsphere/README.md -------------------------------------------------------------------------------- /2dsphere/config.yml.sample: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/2dsphere/config.yml.sample -------------------------------------------------------------------------------- /2dsphere/data/ny-lines.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/2dsphere/data/ny-lines.json -------------------------------------------------------------------------------- /2dsphere/data/ny-nodes.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/2dsphere/data/ny-nodes.json -------------------------------------------------------------------------------- /2dsphere/data/ny-polygons.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/2dsphere/data/ny-polygons.json -------------------------------------------------------------------------------- /2dsphere/data/osm2gj.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/2dsphere/data/osm2gj.py -------------------------------------------------------------------------------- /2dsphere/data/sf-lines.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/2dsphere/data/sf-lines.json -------------------------------------------------------------------------------- /2dsphere/data/sf-nodes.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/2dsphere/data/sf-nodes.json -------------------------------------------------------------------------------- /2dsphere/data/sf-polygons.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/2dsphere/data/sf-polygons.json -------------------------------------------------------------------------------- /2dsphere/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/2dsphere/requirements.txt -------------------------------------------------------------------------------- /2dsphere/static/images/point.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/2dsphere/static/images/point.gif -------------------------------------------------------------------------------- /2dsphere/static/images/point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/2dsphere/static/images/point.png -------------------------------------------------------------------------------- /2dsphere/static/js/jquery-1.8.3.min.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/2dsphere/static/js/jquery-1.8.3.min.js -------------------------------------------------------------------------------- /2dsphere/static/js/mapstest.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/2dsphere/static/js/mapstest.js -------------------------------------------------------------------------------- /2dsphere/templates/mapstest.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/2dsphere/templates/mapstest.html -------------------------------------------------------------------------------- /2dsphere/www.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/2dsphere/www.py -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/README -------------------------------------------------------------------------------- /cpp/eatmem.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/cpp/eatmem.cpp -------------------------------------------------------------------------------- /cpp/fsyncappendtest.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/cpp/fsyncappendtest.cpp -------------------------------------------------------------------------------- /cpp/tailable_cursor.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/cpp/tailable_cursor.cpp -------------------------------------------------------------------------------- /embedded/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/embedded/README -------------------------------------------------------------------------------- /embedded/build.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/embedded/build.bat -------------------------------------------------------------------------------- /embedded/build.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/embedded/build.sh -------------------------------------------------------------------------------- /embedded/embedded.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/embedded/embedded.cpp -------------------------------------------------------------------------------- /embedded/embedded.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/embedded/embedded.h -------------------------------------------------------------------------------- /embedded/helloworld.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/embedded/helloworld.cpp -------------------------------------------------------------------------------- /java/Test.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/java/Test.java -------------------------------------------------------------------------------- /js/amb.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/js/amb.js -------------------------------------------------------------------------------- /js/arrayIndexing.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/js/arrayIndexing.js -------------------------------------------------------------------------------- /js/blog.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/js/blog.js -------------------------------------------------------------------------------- /js/commitlatency.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/js/commitlatency.js -------------------------------------------------------------------------------- /js/compact-example.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/js/compact-example.js -------------------------------------------------------------------------------- /js/fixedArray.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/js/fixedArray.js -------------------------------------------------------------------------------- /js/insert_speed_test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/js/insert_speed_test.js -------------------------------------------------------------------------------- /js/jitter.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/js/jitter.js -------------------------------------------------------------------------------- /js/many_collections.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/js/many_collections.js -------------------------------------------------------------------------------- /js/opsbyip.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/js/opsbyip.js -------------------------------------------------------------------------------- /js/read_speed_test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/js/read_speed_test.js -------------------------------------------------------------------------------- /js/replsetspeed.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/js/replsetspeed.js -------------------------------------------------------------------------------- /js/tailed.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/js/tailed.js -------------------------------------------------------------------------------- /js/voting.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/js/voting.js -------------------------------------------------------------------------------- /jslib-sconstruct: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/jslib-sconstruct -------------------------------------------------------------------------------- /mongo-ldap/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongo-ldap/README.md -------------------------------------------------------------------------------- /mongo-ldap/mongo-ldap.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongo-ldap/mongo-ldap.rb -------------------------------------------------------------------------------- /mongodb-graphson/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/.gitignore -------------------------------------------------------------------------------- /mongodb-graphson/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/README.md -------------------------------------------------------------------------------- /mongodb-graphson/javascript/export-graphson.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/javascript/export-graphson.js -------------------------------------------------------------------------------- /mongodb-graphson/javascript/load-graphson.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/javascript/load-graphson.js -------------------------------------------------------------------------------- /mongodb-graphson/javascript/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/javascript/test.txt -------------------------------------------------------------------------------- /mongodb-graphson/pom.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/pom.xml -------------------------------------------------------------------------------- /mongodb-graphson/src/main/java/org/mongodb/graph/DuplicateMode.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/src/main/java/org/mongodb/graph/DuplicateMode.java -------------------------------------------------------------------------------- /mongodb-graphson/src/main/java/org/mongodb/graph/GraphSON.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/src/main/java/org/mongodb/graph/GraphSON.java -------------------------------------------------------------------------------- /mongodb-graphson/src/main/java/org/mongodb/graph/GraphSONReader.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/src/main/java/org/mongodb/graph/GraphSONReader.java -------------------------------------------------------------------------------- /mongodb-graphson/src/main/java/org/mongodb/graph/GraphSONTool.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/src/main/java/org/mongodb/graph/GraphSONTool.java -------------------------------------------------------------------------------- /mongodb-graphson/src/main/java/org/mongodb/graph/GraphSONWriter.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/src/main/java/org/mongodb/graph/GraphSONWriter.java -------------------------------------------------------------------------------- /mongodb-graphson/src/main/java/org/mongodb/graph/JSONGraphListener.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/src/main/java/org/mongodb/graph/JSONGraphListener.java -------------------------------------------------------------------------------- /mongodb-graphson/src/main/java/org/mongodb/graph/MongoDBListener.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/src/main/java/org/mongodb/graph/MongoDBListener.java -------------------------------------------------------------------------------- /mongodb-graphson/src/test/java/org/mongodb/graph/GraphSONExportTest.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/src/test/java/org/mongodb/graph/GraphSONExportTest.java -------------------------------------------------------------------------------- /mongodb-graphson/src/test/java/org/mongodb/graph/GraphSONImportTest.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/src/test/java/org/mongodb/graph/GraphSONImportTest.java -------------------------------------------------------------------------------- /mongodb-graphson/src/test/resources/embedded-graph.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/src/test/resources/embedded-graph.json -------------------------------------------------------------------------------- /mongodb-graphson/src/test/resources/extended-graph.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/src/test/resources/extended-graph.json -------------------------------------------------------------------------------- /mongodb-graphson/src/test/resources/modified-graph.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/src/test/resources/modified-graph.json -------------------------------------------------------------------------------- /mongodb-graphson/src/test/resources/simple-graph.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/mongodb-graphson/src/test/resources/simple-graph.json -------------------------------------------------------------------------------- /perf/disk.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/perf/disk.cpp -------------------------------------------------------------------------------- /py/analytics.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/py/analytics.py -------------------------------------------------------------------------------- /py/debug.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/py/debug.py -------------------------------------------------------------------------------- /py/queue.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/py/queue.py -------------------------------------------------------------------------------- /py/readbsonfile.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/py/readbsonfile.py -------------------------------------------------------------------------------- /py/taillog.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/py/taillog.py -------------------------------------------------------------------------------- /replication/driver_test/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/replication/driver_test/README -------------------------------------------------------------------------------- /replication/driver_test/driver_replset_test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/replication/driver_test/driver_replset_test.js -------------------------------------------------------------------------------- /replication/driver_test/runner.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/replication/driver_test/runner.py -------------------------------------------------------------------------------- /replication/driver_test/test.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/replication/driver_test/test.php -------------------------------------------------------------------------------- /replication/driver_test/test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/replication/driver_test/test.py -------------------------------------------------------------------------------- /replication/driver_test/test.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/replication/driver_test/test.rb -------------------------------------------------------------------------------- /replication/misc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/replication/misc.js -------------------------------------------------------------------------------- /replication/repl_info.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/replication/repl_info.py -------------------------------------------------------------------------------- /replication/repl_info.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/replication/repl_info.rb -------------------------------------------------------------------------------- /replication/simple-setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/replication/simple-setup.py -------------------------------------------------------------------------------- /replication/test_latency.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/replication/test_latency.js -------------------------------------------------------------------------------- /replication/tl.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/replication/tl.bat -------------------------------------------------------------------------------- /sharding/chunk-checker.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/sharding/chunk-checker.js -------------------------------------------------------------------------------- /sharding/count_objects.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/sharding/count_objects.js -------------------------------------------------------------------------------- /sharding/first.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/sharding/first.js -------------------------------------------------------------------------------- /sharding/first.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/sharding/first.py -------------------------------------------------------------------------------- /sharding/multi_split.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/sharding/multi_split.js -------------------------------------------------------------------------------- /sharding/simple-setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/sharding/simple-setup.py -------------------------------------------------------------------------------- /vs2010/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/vs2010/README -------------------------------------------------------------------------------- /vs2010/js.sln: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/vs2010/js.sln -------------------------------------------------------------------------------- /vs2010/js.vcxproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/vs2010/js.vcxproj -------------------------------------------------------------------------------- /vs2010/jskwgen/jskwgen.vcxproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/vs2010/jskwgen/jskwgen.vcxproj -------------------------------------------------------------------------------- /vs2010/snippets/snippets.sln: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/mongo-snippets/HEAD/vs2010/snippets/snippets.sln --------------------------------------------------------------------------------