Last active
May 9, 2018 14:34
-
-
Save AABoyles/081cbab881012062cca5 to your computer and use it in GitHub Desktop.
Bootstrap a Ubuntu Machine
This file contains hidden or 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 | |
## Deprecated. See instead: https://github.com/AABoyles/dotfiles/blob/master/bootstrap.sh | |
## Make sure we get the latest stable release of R. | |
echo 'deb https://cran.rstudio.com/bin/linux/ubuntu xenial/' >> /etc/apt/sources.list | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 | |
sudo apt-get update | |
## Install Vim, R, Python 2, Python 3, Julia & c. | |
sudo apt-get -y install vim git r-base r-base-dev \ | |
python-dev build-essential python-pip \ | |
python-numpy python-scipy python-matplotlib \ | |
python-pandas python-sympy python-nose \ | |
python3 python3-dev python3-pip \ | |
python3-numpy python3-scipy python3-matplotlib \ | |
julia tesseract-ocr imagemagick scrot xsel | |
## Install Jupyter ## | |
sudo pip3 install jupyter csvkit | |
sudo apt-get -y upgrade | |
sudo apt-get -y autoremove | |
## Install theFuck ## | |
wget -O - https://raw.githubusercontent.com/nvbn/thefuck/master/install.sh | sh - && $0 | |
echo " | |
## Get sane copying and pasting | |
alias pbcopy='xsel --clipboard --input' | |
alias pbpaste='xsel --clipboard --output' | |
##Alternately: | |
#alias pbcopy=’xclip -selection clipboard’ | |
#alias pbpaste=’xclip -selection clipboard -o’ | |
## Refresh bash when needed | |
alias refresh='source ~/.bashrc' | |
" >> ~/.bash_aliases | |
## Make bash autocompletion act as expected ## | |
bind "set completion-ignore-case on" | |
bind "set completion-map-case on" | |
bind "set show-all-if-ambiguous on" | |
shopt -s autocd | |
shopt -s dirspell | |
shopt -s cdspell | |
shopt -s cdable_vars ## Make some cd-able short names | |
export documents="$HOME/Documents" | |
export dropbox="$HOME/Dropbox" | |
export projects="$HOME/Projects" | |
export downloads="$HOME/Downloads" | |
## Tweak history ## | |
shopt -s histappend # Append to the history file, don't overwrite it | |
shopt -s cmdhist # Save multi-line commands as one command | |
PROMPT_COMMAND='history -a' # Record each line as it gets issued | |
HISTSIZE=500000 # Make history buffer huge. | |
HISTFILESIZE=100000 # Make history buffer huge. | |
HISTCONTROL="erasedups:ignoreboth" # Avoid duplicate entries | |
export HISTIGNORE="&:[ ]*:exit:ls:bg:fg:history" # Don't record some commands | |
HISTTIMEFORMAT='%F %T ' # Useful timestamp format | |
## Automatically install updates on a schedule ## | |
echo "0 4 * * * root (apt-get update && apt-get -y upgrade && apt-get -y autoremove && apt-get -y autoclean) > /dev/null" | crontab - | |
## Get my scripts, put them on my path ## | |
git clone [email protected]:2a38410a6eb3ec8f7250.git scripts | |
wget -O scripts/jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 | |
echo 'PATH=~/scripts:$PATH; export PATH;' >> ~/.profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you just want to run this,
wget -O - https://gist.githubusercontent.com/AABoyles/081cbab881012062cca5/raw/bootstrap.sh | bash