Skip to content

Instantly share code, notes, and snippets.

View basedalexander's full-sized avatar
🎯
Focusing

Alex Based basedalexander

🎯
Focusing
View GitHub Profile
db.getCollection('collName').find({}).sort({ timestamp: -1 }).limit(1)
db.getCollection('collName').remove({
timestamp:{
$lte : 1551126714784.0
}
})
https://gist.github.com/webinista/812c20247a6c21e639ce
db.getCollection('simple-arb').updateMany({},{"$unset":{"createDateDick":1}})
ssh -i /path/to/my.pem myuser@host -t 'sudo docker exec -it container_name /bin/bash'
// Get sum of a certain field across all the documents in a collection
db.getCollection('simple-arb').aggregate([
{
$match: {
closed: {
$eq: true
}
}
}, {
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]
# 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
# Default data dir
# MAC OS ~/eosio-wallet
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