Skip to content

Instantly share code, notes, and snippets.

@xvzftube
Last active July 29, 2021 14:50
Show Gist options
  • Save xvzftube/2eb4c5d9bababa6d27ee8bead5019bf3 to your computer and use it in GitHub Desktop.
Save xvzftube/2eb4c5d9bababa6d27ee8bead5019bf3 to your computer and use it in GitHub Desktop.
AWS EC2 Ubuntu 18.04
#!/bin/sh
# License: GNU GPLv3
sudo apt-get update && apt-get upgrade -y
# install other common utils
sudo apt-get install build-essential wget curl make tmux git python3-pip neofetch stow -y
# Download recent neovim
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
chmod u+x nvim.appimage
echo "alias nvim=/home/ubuntu/./nvim.appimage" >> ~/.bashrc
# R section
sudo apt-get install dirmngr apt-transport-https ca-certificates software-properties-common gnupg2
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/'
sudo apt update
sudo apt install r-base
# OpenBlas library to get higher performance for linear algebra operations
sudo apt install libopenblas-base -y
# make a home for init.vim
mkdir -p dotfiles/nvim/.config/nvim/
wget -O dotfiles/nvim/.config/nvim/init.vim https://gist.githubusercontent.com/xvzftube/5380163d8fc9090796eb6fcc61fe022d/raw/176ef6d2691a8eb0c29d778b0971c8a331009781/init.vim
# vimplug
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
# jedi is an autocomplete library. Very nice for vim.
pip3 install jedi flake8 isort pynvim black
# stow configs
cd dotfiles
stow nvim
cd
# nvim into dotfiles/nvim/.config/nvim and run :PlugInstall # to install all vim packages
# Install rust
curl https://sh.rustup.rs -sSf | sh
source ~/.bashrc
# Install Go
wget https://golang.org/dl/go1.16.6.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.16.6.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment