Skip to content

Instantly share code, notes, and snippets.

View munabedan's full-sized avatar

Muna Bedan munabedan

View GitHub Profile
@munabedan
munabedan / bashrc.sh
Last active January 20, 2024 10:30
Bash function for apt updatde, upgrade, autoremove and clean
#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"
@munabedan
munabedan / bashrc.sh
Created January 20, 2024 10:32
Bash function for opening multiple firefox tabs from the commandline
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/" &
}
@munabedan
munabedan / .bashrc.sh
Created January 20, 2024 10:34
Making python virtual environments less of an annoyance to use
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
@munabedan
munabedan / install_wordpress.sh
Created January 26, 2024 19:36
Install wordpress script
#!/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