I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
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
#!/bin/bash | |
#Force file syncronization and lock writes | |
mongo admin --eval "printjson(db.fsyncLock())" | |
MONGODUMP_PATH="/usr/bin/mongodump" | |
MONGO_HOST="prod.example.com" | |
MONGO_PORT="27017" | |
MONGO_DATABASE="dbname" | |
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
#----{ Aliases for Ubuntu: }-------------------------------------------------- | |
# Admin | |
alias update="sudo apt-get update ; sudo apt-get -ZWry safe-upgrade && sudo apt-get -ZWry --purge-unused clean" | |
alias sources="sudo nano /etc/apt/sources.list" | |
alias install="sudo apt-get -ZWry install" | |
alias uninstall="sudo apt-get -ZWry remove" | |
alias pkgsearch="apt-get search" | |
alias installed="dpkg --get-selections | grep" | |
alias add-repo="sudo add-apt-repository" | |
alias app="apropos" |