Last active
September 21, 2020 03:29
-
-
Save tjwaterman99/7eae237c05f2a76ed841a5bba00897d5 to your computer and use it in GitHub Desktop.
Set up script for a dev environment
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
#!/bin/bash | |
# Install with curl https://gist.githubusercontent.com/tjwaterman99/7eae237c05f2a76ed841a5bba00897d5/raw | bash | |
# TODO: | |
# paramaters for $USER, AWS keys, github access token | |
# docker | |
# docker-compose | |
# Heroku | |
# https://zaiste.net/posts/shell-commands-rust/ | |
# it would be nice if we could use automatically assign an | |
# elastic IP and subdomain on, say tjwaterman.com | |
# Add repository for Github CLI | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0 | |
sudo apt-add-repository https://cli.github.com/packages | |
sudo apt-get update | |
sudo apt-get install -y \ | |
zsh \ | |
unzip \ | |
fontconfig \ | |
htop \ | |
tree \ | |
nginx \ | |
awscli \ | |
git \ | |
postgresql \ | |
postgresql-contrib \ | |
pgcli \ | |
gh | |
# Install awless | |
curl https://raw.githubusercontent.com/wallix/awless/master/getawless.sh | bash | |
tar -xzf awless-linux-386.tar.gz | |
sudo mv awless /usr/local/bin | |
# Change shell to zsh | |
sudo chsh -s /usr/bin/zsh | |
# Aliases | |
echo 'alias pg="pgcli"' >> ~/.zshrc | |
# Exports | |
echo 'export EDITOR="code -w"' >> ~/.zshrc # vscode as default editor | |
# Install pyenv | |
git clone https://github.com/pyenv/pyenv.git ~/.pyenv | |
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc | |
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc | |
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc | |
# Install FireMono font | |
mkdir ~/.fonts | |
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/FiraMono.zip | |
unzip -o -d ~/.fonts FiraMono.zip | |
rm FiraMono.zip | |
fc-cache -fv | |
# Install Starship prompt | |
curl -fsSL https://starship.rs/install.sh | bash | |
echo 'eval "$(starship init zsh)"' >> ~/.zshrc | |
# Set up a postgres db | |
createdb $USER | |
echo "You should now reboot: sudo reboot" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment