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
# Python environment | |
export WORKON_HOME=$HOME/.virtualenvs | |
export PROJECT_HOME=$HOME/Projects | |
# Set up virtual wrapper env | |
source /usr/local/bin/virtualenvwrapper.sh | |
# for testing, set pytest to verbose by default | |
alias pytest='pytest -v' |
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
# these are some common mongodb cli commands | |
# Get help | |
MongoDB Enterprise > help | |
# get a list of databases | |
show dbs | |
# get list of collections | |
show collections |
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
# this will copy the collection 'my_original' to 'my_copy' | |
db.my_original.aggregate([{$match: {}}, {$out: "my_copy"}]) | |
# to move the collection to another db within the same Atlas mongodb cluster | |
db.adminCommand({renameCollection: "my_db.my_copy", to: "other_db.other_name"}) |
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 the key-id from KMS | |
% aws kms list-keys | |
# To encrypt some text: | |
% aws kms encrypt --key-id <KeyId> --plaintext <text to encrypt> | |
# To decrypt it: | |
% aws kms decrypt --ciphertext-blob fileb://<(echo <blob from encrypt step> | base64 -D) --output text --query Plaintext | base64 -D | |
NewerOlder