Last active
May 16, 2022 09:01
-
-
Save zwongeer/bf620474a4bbd90d840dd73bd8a64540 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
# !pip install colab_ssh --upgrade | |
# from colab_ssh import launch_ssh_cloudflared, init_git_cloudflared | |
# launch_ssh_cloudflared(password="<PUT_YOUR_PASSWORD_HERE>") | |
# Optional: if you want to clone a Github or Gitlab repository | |
# repository_url="<PUT_YOUR_REPOSITORY_URL_HERE>" | |
# init_git_cloudflared(repository_url) | |
SHELL_FOLDER=$(dirname $(readlink -f "$0")) | |
#cd $SHELL_FOLDER | |
error_trap () { | |
local lc="$BASH_COMMAND" rc=$? | |
echo "Failed:Command [$lc] exited with code [$rc]" | |
} | |
exit_trap() { | |
true | |
} | |
trap error_trap ERR | |
trap exit_trap EXIT | |
set -e | |
cat << EOF >/etc/apt/source.list | |
deb http://archive.ubuntu.com/ubuntu bionic main multiverse restricted universe | |
deb http://archive.ubuntu.com/ubuntu bionic-security main multiverse restricted universe | |
deb http://archive.ubuntu.com/ubuntu bionic-updates main multiverse restricted universe | |
#deb-src http://archive.ubuntu.com/ubuntu bionic main multiverse restricted universe | |
#deb-src http://archive.ubuntu.com/ubuntu bionic-security main multiverse restricted universe | |
#deb-src http://archive.ubuntu.com/ubuntu bionic-updates main multiverse restricted universe | |
EOF | |
apt update | |
export MAKEFLAGS="-j$(nproc)" | |
apt install inetutils-* -y | |
apt install unzip aria2 cloc sshpass sshfs rsync screen tmux nano file tree iotop iftop netcat htop neofetch net-tools -y | |
if [ ! -x "$(command -v nvtop)" ]; then | |
apt install cmake libncurses5-dev libncursesw5-dev -y && git clone https://github.com/Syllo/nvtop.git --depth=1 && mkdir -p nvtop/build && cd nvtop/build && cmake .. && make && make install | |
cd $SHELL_FOLDER | |
rm -rf nvtop | |
fi | |
if [ ! -x "$(command -v bat)" ]; then | |
wget https://github.com/sharkdp/bat/releases/download/v0.20.0/bat-musl_0.20.0_amd64.deb | |
dpkg -i bat-musl_0.20.0_amd64.deb | |
rm -f bat-musl_0.20.0_amd64.deb | |
fi | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
source $HOME/.cargo/env | |
rustup component add rls rust-analysis rust-src | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
nvm install --lts | |
nvm use --lts | |
npm i -g yarn | |
pip install d2l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment