Skip to content

Instantly share code, notes, and snippets.

@t0k4rt
Last active February 4, 2019 16:36
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 t0k4rt/b5175920c3fb2adf77c657a81677c33e to your computer and use it in GitHub Desktop.
Save t0k4rt/b5175920c3fb2adf77c657a81677c33e to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
sudo apt update && sudo apt upgrade -y
# dependencies
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 \
git wget curl dconf-cli gcc uget apt-transport-https
# Pyenv
[ ! -d ~/.pyenv ] && curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
# ZSH + Zplug
sudo apt-get install -y zsh
[ ! -d ~/.zplug ] && curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh
# CUDA
# Install nvidia drivers
# sudo add-apt-repository -y ppa:graphics-drivers/ppa
# sudo ubuntu-drivers autoinstall
# wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
# sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
# sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
# sudo apt-get update
# sudo apt-get install -y cuda
# Enable pyenv
cat >> ~/.zshrc <<- EOM
####### Gitignore
function gi() { curl -L -s https://www.gitignore.io/api/$@ ;}
####### Pyenv
export PYENV_ROOT="$HOME"/.pyenv
export PATH="$PYENV_ROOT"/bin:"$PATH"
rehash
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
eval "$(pyenv virtualenv-init -)"
###### Colorz
# DirCOlOrz
wget https://raw.github.com/trapd00r/LS_COLORS/master/LS_COLORS -O $HOME/.dircolors
eval $(dircolors -b $HOME/.dircolors)
alias ls='ls --color'
alias grep='grep --color'
###### Zplug
export ZPLUG_HOME=~/.zplug
source $ZPLUG_HOME/init.zsh
# Clear packages
zplug clear
zplug "zsh-users/zsh-syntax-highlighting"
zplug "zsh-users/zsh-autosuggestions"
zplug "zsh-users/zsh-completions"
zplug denysdovhan/spaceship-prompt, use:spaceship.zsh, from:github, as:theme
EOM
cat >> ~/.zshrc <<- EOM
# Install packages that have not been installed yet
if ! zplug check --verbose; then
printf "Install? [y/N]:"
if read -q; then
echo; zplug install
else
echo
fi
fi
zplug load
EOM
# Slack
snap install slack --classic
# Pycharm
snap install pycharm-community --classic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment