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 x = {_id: 1, 'tags' : { 'castle' : { 'n' : 10 }, 'age' : { 'n' : 2 } } }; | |
| var y = {_id: 2, 'tags' : { 'keep' : { 'n' : 2 }, 'castle' : { 'n' : 6 } } }; | |
| var z = {_id: 3, 'tags' : { 'keep' : { 'n' : 5 }, 'cats' : { 'n' : 6 } } }; | |
| db.doc.save(x); | |
| db.doc.save(y); | |
| db.doc.save(z); | |
| // find all docs | |
| db.doc.find(); |
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
| // Get a the current collection size. | |
| var storage = db.foo.storageSize(); | |
| var total = db.foo.totalSize(); | |
| print('Storage Size: ' + tojson(storage)); | |
| print('TotalSize: ' + tojson(total)); | |
| print('-----------------------'); | |
| print('Running db.repairDatabase()'); |
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
| # Select-FileDialog Function # | |
| # Created by Hugo Peeters # | |
| # http://www.peetersonline.nl # | |
| ############################### | |
| # Note: store in your profile for easy use | |
| # Example use: | |
| # $file = Select-FileDialog -Title "Select a file" -Directory "D:\scripts" -Filter "Powershell Scripts|(*.ps1)" | |
| function Select-FileDialog |
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
| use cookie; | |
| /** | |
| * Cookie to lookups process | |
| */ | |
| create_new_lookup = function(x) { | |
| var ins = new Array; | |
| var outs = new Array; | |
| for(var i in x.maps) { |
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
| # Apt-get basic build and git | |
| sudo apt-get install build-essential | |
| sudo apt-get git-core | |
| # Set up a folder for Node.js, then download and build | |
| mkdir node_src | |
| cd node_src | |
| git clone git://github.com/ry/node.git # may take a few minutes | |
| cd node | |
| ./configure |
NewerOlder