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 | |
# prompt user to run with sudo | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run with sudo" | |
exit | |
fi | |
# Login to MySQL as root | |
# set user variable |
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
venv() { | |
# Check if already activated | |
if [[ "$VIRTUAL_ENV" != "" ]]; then | |
echo -e "\n\e[1;33mDeactivating current virtual environment...\e[0m" | |
deactivate | |
return | |
fi | |
# Check if the venv directory exists | |
if [ -d "venv" ]; then |
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
firefox-work() { | |
firefox "https://www.upwork.com/nx/find-work/best-matches" \ | |
"https://www.reddit.com/" \ | |
"https://www.linkedin.com/mynetwork/" \ | |
"https://mail.google.com/mail/u/0/#inbox" \ | |
"https://github.com/" \ | |
"https://console.firebase.google.com/" & | |
} |
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
#run apt updatde, upgrade, autoremove and clean | |
apt-update() { | |
echo -e "\n\e[1;33mRunning apt-get update...\e[0m" | |
sudo apt-get update | |
echo -e "\n\e[1;33mRunning apt-get upgrade...\e[0m" | |
sudo apt-get -y upgrade | |
echo -e "\n\e[1;33mRunning apt-get autoremove...\e[0m" | |
sudo apt-get -y autoremove | |
echo -e "\n\e[1;33mRunning apt-get clean...\e[0m" |