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
db.getCollection('collName').find({}).sort({ timestamp: -1 }).limit(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
db.getCollection('collName').remove({ | |
timestamp:{ | |
$lte : 1551126714784.0 | |
} | |
}) |
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
https://gist.github.com/webinista/812c20247a6c21e639ce | |
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
db.getCollection('simple-arb').updateMany({},{"$unset":{"createDateDick":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
ssh -i /path/to/my.pem myuser@host -t 'sudo docker exec -it container_name /bin/bash' |
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
// Get sum of a certain field across all the documents in a collection | |
db.getCollection('simple-arb').aggregate([ | |
{ | |
$match: { | |
closed: { | |
$eq: true | |
} | |
} | |
}, { |
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
https://eosio.stackexchange.com/a/505/1256 | |
https://eosio.stackexchange.com/questions/742/how-do-you-properly-change-add-to-the-struct-that-is-stored-in-a-table-as-part-o | |
Jesse, [15.06.18 03:04] | |
I would actually be fine if I could delete all rows from the table that has been changed, but leave the other tables alone, as I can repopulate the table that is being changed | |
Jesse, [15.06.18 03:05] | |
A migration action | |
Jesse, [15.06.18 03:05] |
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
# NOTE VERY IMPORTANT - an account's name should be 12-chars long 1-5.a-z | |
tcleos system newaccount --stake-net "10.0000 EOS" --stake-cpu "10.0000 EOS" --buy-ram-kbytes 4 account_creator new_account pkey1 pkey2 |
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
# Default data dir | |
# MAC OS ~/eosio-wallet |
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
chomod 720 file_or_dir | |
# 1) 7 - owners rights | |
# 2) 2 - right for users who belongs to the owner's group | |
# 3) 0 - other users | |
# 4 - read | |
# 2 - write | |
# 1 - execute |
NewerOlder