Skip to content

Instantly share code, notes, and snippets.

@thcborges
Last active February 21, 2021 01:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thcborges/f7262ed098d750d17ce2f311ad6d494f to your computer and use it in GitHub Desktop.
Save thcborges/f7262ed098d750d17ce2f311ad6d494f to your computer and use it in GitHub Desktop.
Script to reinstall some applications after rebooting your system
#!/bin/bash
sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \
libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl \
gdebi gdebi-core git telegram-desktop apt-transport-https curl gnupg \
htop neovim openssh-server default-jdk tmux autoconf bison gettext libgd-dev \
libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmariadb-dev \
libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev \
libxml2-dev libzip-dev openssl pkg-config re2c zlib1g-dev dirmngr gpg coreutils \
ca-certificates gnupg-agent software-properties-common python3-pip python3-venv \
gnome-tweaks gimp stacer ranger neofetch ncdu
echo -e "\n\nInstalling BRAVE\n\n"
curl -s https://brave-browser-apt-release.s3.brave.com/brave-core.asc | sudo apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser-release.gpg add -
echo "deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave-browser-release.list
sudo apt update
sudo apt install brave-browser
echo -e "\n\nInstalling VSCODE\n\n"
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt update
sudo apt install code -y
# JetBrains Toolbox
wget -cO jetbrains-toolbox.tar.gz "https://data.services.jetbrains.com/products/download?platform=linux&code=TBA"
tar -xzf jetbrains-toolbox.tar.gz
DIR=$(find . -maxdepth 1 -type d -name jetbrains-toolbox-\* -print | head -n1)
cd $DIR
./jetbrains-toolbox
cd ..
rm -r $DIR
rm jetbrains-toolbox.tar.gz
echo -e "\n\nInstalling POETRY\n\n"
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 -
source $HOME/.poetry/env
poetry completions bash > /etc/bash_completion.d/poetry.bash-completion
echo -e "\n\nInstalling DEPHELL\n\n"
curl -L dephell.org/install | python3
echo -e "\n\nInstalling SPARK\n\n"
curl -s https://mirrors.ocf.berkeley.edu/apache/spark/spark-3.0.1/spark-3.0.1-bin-hadoop3.2.tgz -o ~/Downloads/spark-3.0.1-bin-hadoop3.2.tgz
tar xvf ~/Downloads/spark-3.0.1-bin-hadoop3.2.tgz
sudo mv spark-3.0.1-bin-hadoop3.2/ /opt/spark
echo -e '\nexport SPARK_HOME=/opt/spark
export PATH=$PATH:$SPARK_HOME/bin:$SPARK_HOME/sbin\n' >> ~/.profile
source ~/.profile
echo -e "\n\nInstalling ASDF\n\n"
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
cd ~/.asdf
git checkout "$(git describe --abbrev=0 --tags)"
echo -e '
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
' >> ~/.bashrc
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
echo -e "\n\nInstalling ASDF PYHTON PLUGIN\n\n"
asdf plugin add pyhton
asdf install python latest
asdf global python $(asdf list python)
echo -e "\n\nInstalling ASDF PHP PLUGIN\n\n"
asdf plugin-add php https://github.com/asdf-community/asdf-php.git
asdf install php latest
asdf global php $(asdf list php)
echo -e "\n\nInstalling ASDF NODEJS PLUGIN\n\n"
asdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.git
bash -c '${ASDF_DATA_DIR:=$HOME/.asdf}/plugins/nodejs/bin/import-release-team-keyring'
asdf install nodejs latest
asdf global nodejs $(asdf list nodejs)
echo -e "\n\nInstalling ASDF YARN PLUGIN\n\n"
asdf plugin-add yarn
asdf install yarn latest
asdf global yarn $(asdf list yarn)
echo -e "\n\nInstalling ASDF GO PLUGIN\n\n"
asdf plugin-add golang https://github.com/kennyp/asdf-golang.git
asdf install golang latest
asdf global golang $(asdf list golang)
echo -e "\n\nInstalling DOCKER\n\n"
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker "$(whoami)"
echo -e "\n\nInstalling DOCKER-COMPOSE\n\n"
sudo curl -sL "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
echo -e "\n\nInstalling ZSH\n\n"
sudo apt install zsh -y
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
poetry completions zsh > ~/.zfunc/_poetry
wget -c -P '/home/'$USER'/Downloads' https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Hack/Regular/complete/Hack%20Regular%20Nerd%20Font%20Complete.ttf
echo 'export ZSH="/home/'$USER'/.oh-my-zsh"
ZSH_THEME="powerlevel9k/powerlevel9k"
plugins=(
asdf
git
zsh-syntax-highlighting
zsh-autosuggestions
dnf
)
source $ZSH/oh-my-zsh.sh
POWERLEVEL9K_MODE="nerdfont-complete"
POWERLEVEL9K_SHORTEN_DIR_LENGTH=3
POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR="\uE0B4"
POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR="\uE0B6"
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="%F{#5b4866}╭─\uE0B6"
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="%F{#5b4866}╰─> "
POWERLEVEL9K_TIME_FORMAT="%D{%I:%M:%S %p}"
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(user dir dir_writable vcs ssh)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs time)
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
POWERLEVEL9K_PYTHON_ICON='' #'\UE73C'
POWERLEVEL9K_VIRTUALENV_BACKGROUND='red'
POWERLEVEL9K_VIRTUALENV_FOREGROUND='white'
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs virtualenv time)
' > ~/.zshrc
mkdir -p ~/.local/share/fonts
mv ~/Downloads/*.ttf ~/.local/share/fonts
fc-cache -f -v
echo -e "\n\nInstalling ANYDESK\n\n"
wget https://download.anydesk.com/linux/anydesk_6.0.1-1_amd64.deb -O ~/Downloads/anydesk.deb
sudo apt install ~/Downloads/anydesk.deb -y
sudo apt install -y ubuntu-restricted-extras
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment