Skip to content

Instantly share code, notes, and snippets.

@2XXE-SRA
Forked from GeneralTesler/init.sh
Last active November 9, 2018 16:40
Show Gist options
  • Save 2XXE-SRA/f4396199f1df677233e2c4efec01f7d1 to your computer and use it in GitHub Desktop.
Save 2XXE-SRA/f4396199f1df677233e2c4efec01f7d1 to your computer and use it in GitHub Desktop.
bootstrapper script
#!/bin/bash
#bashrc config
echo "PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\][\u⛾ \h]\[\033[00m\] \[\033[01;33m\][\w]\[\033[00m\]\n└─ '" >> $HOME/.bashrc
echo "PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\][\u⛾ \h]\[\033[00m\] \[\033[01;33m\][\w]\[\033[00m\]\n└─ '" >> sudo tee -a /root/.bashrc
echo "export PATH=~/.local/bin:$PATH" >> $HOME/.bashrc
echo "export PATH=~/.local/bin:$PATH" >> /root/.bashrc
#apt general
sudo apt-get update -y
sudo apt-get install -y tree vim git python python-pip ranger docker.io unzip
sudo apt remote python-paramiko
#vundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
#ycm
sudo apt install build-essential cmake python-dev
git clone https://github.com/Valloric/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe
cd ~/.vim/bundle/YouCompleteMe
git submodule update --init --recursive
sudo python install.py
#basic vim config
cat > $HOME/.vimrc << EOF
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'Valloric/YouCompleteMe'
call vundle#end()
filetype plugin indent on
set whichwrap+=<,>,h,l,[,]
colorscheme elflord
syntax enable
set tabstop=4
set softtabstop=4
set expandtab
set number
set incsearch
set hlsearch
EOF
#plugin install
vim +PluginInstall +qall
vim +PluginUpdate +qall
#aws
pip install awscli
#ansible
pip install paramiko
sudo apt-add-repository -y ppa:ansible/ansible
sudo apt-get update -y
sudo apt-get install -y ansible
#terraform
tfversion="0.11.10"
wget "https://releases.hashicorp.com/terraform/"$tfversion"/terraform_"$tfversion"_linux_amd64.zip" -O /tmp/terraform.zip
cd /tmp
unzip terraform.zip && rm terraform.zip
sudo mv terraform /usr/bin/terraform
#terraform completion
cd $HOME
mkdir .bash_completion.d
cat > .bash_completion << EOF
for bcfile in ~/.bash_completion.d/* ; do
[ -f "$bcfile" ] && . $bcfile
done
EOF
wget "https://raw.githubusercontent.com/Bash-it/bash-it/master/completion/available/terraform.completion.bash" -O .bash_completion.d/terraform.bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment