Last active
June 6, 2018 02:22
-
-
Save grahamcrowell/68cf267f0ce63421ebaa61c648972b19 to your computer and use it in GitHub Desktop.
ubuntu development environment bootstrap script
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
.vscode |
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 sh | |
# update apt-get | |
sudo apt-get update | |
# upgrade all installed apps | |
sudo apt-get upgrade | |
# log default install | |
mkdir ~/Documents/logs | |
apt list --installed >> ~/Documents/logs/default_installs.log | |
# chrome | |
# https://askubuntu.com/a/510186 | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee /etc/apt/sources.list.d/google-chrome.list | |
sudo apt-get update | |
sudo apt-get install google-chrome-stable | |
# run install_git.sh | |
./install_git.sh | |
# zsh | |
# https://github.com/robbyrussell/oh-my-zsh | |
sudo apt-get install -y zsh | |
sudo sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" | |
# linuxbrew | |
# http://linuxbrew.sh/ | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" | |
sudo apt-get install build-essential | |
# requires: env.sh | |
# curl | |
sudo apt-get install curl | |
# vscode | |
# https://code.visualstudio.com/docs/setup/linux | |
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg | |
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg | |
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list' | |
sudo apt-get update | |
sudo apt-get install -y code # or code-insiders | |
# java | |
# https://stackoverflow.com/a/49507161 | |
sudo add-apt-repository ppa:linuxuprising/java | |
sudo apt-get update | |
sudo apt-get install -y oracle-java10-installer | |
# python3 | |
# https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-ubuntu-16-04 | |
sudo apt-get install -y python3-pip | |
sudo apt-get install -y build-essential libssl-dev libffi-dev python-dev | |
sudo apt-get install -y python3-venv | |
./install_js.sh | |
# requires: env.sh | |
# awscli | |
# https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-linux.html | |
pip3 install awscli --upgrade --user | |
# go | |
# https://github.com/golang/go/wiki/Ubuntu | |
sudo add-apt-repository ppa:gophers/archive | |
sudo apt-get update | |
sudo apt-get install golang-1.10-go | |
# TODO add /usr/lib/go-1.10/bin to PATH | |
# shfmt (for vscode) | |
/usr/lib/go-1.10/bin/go get -u mvdan.cc/sh/cmd/shfmt | |
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 sh | |
#################################### | |
# installation: | |
# 1. copy this to ~/env.sh | |
# 2. add following line to ~/.zshrc | |
# source ~/env.sh | |
#################################### | |
echo "$0" | |
# nvm | |
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 | |
# linux brew | |
export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH" | |
export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH" | |
export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH" | |
PATH="/home/linuxbrew/.linuxbrew/bin:$PATH" | |
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 sh | |
# git | |
sudo apt-get install -y git | |
git config --global user.email "graham.crowell@gmail.com" | |
git config --global user.name "grahamcrowell" | |
# TODO FIXME | |
if [ -f ~/.shh/id_rsa ] | |
then | |
echo "rsa key already exists"; | |
else | |
echo "foo" | |
fi | |
# config github account key | |
ssh-keygen -t rsa -b 4096 -C "graham.crowell@gmail.com" | |
eval "$(ssh-agent -s)" | |
ssh-add ~/.ssh/id_rsa | |
sudo apt-get install xclip | |
xclip -sel clip < ~/.ssh/id_rsa.pub | |
google-chrome https://github.com/settings/ssh/new |
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 sh | |
# nvm | |
# https://github.com/creationix/nvm | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash | |
# load nvm into terminal session | |
# TODO add this to ~/.zshrc | |
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 | |
# node | |
# https://github.com/creationix/nvm | |
nvm install node | |
# yarn | |
# https://yarnpkg.com/lang/en/docs/install/#debian-stable | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo | |
sudo apt-get install -yy --no-install-recommends yarn | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment