Skip to content

Instantly share code, notes, and snippets.

@fabbrito
Last active February 19, 2021 15:26
Show Gist options
  • Save fabbrito/ae30fbc28974fbfd53bd5c0dc29f2368 to your computer and use it in GitHub Desktop.
Save fabbrito/ae30fbc28974fbfd53bd5c0dc29f2368 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Check existence/ Creates the .ssh directory
[ -d ~/.ssh ] || mkdir ~/.ssh
# Generate an ED25519 key and display the public key
ssh-keygen -o -a 100 -t ed25519
echo 'Your ED25519 key'
cat ~/.ssh/id_ed25519.pub
read -p 'You should add your public key to GitHub now. Press any key to continue...'
read -p 'Now you will generate a GPG key. Please use RSA/RSA with a keysize of 4096 bits. Press any key to continue...'
gpg --default-new-key-algo rsa4096 --gen-key
new_key=$(gpg --list-secret-keys --with-colons | cut -d: -f5)
gpg --armor --export $new_key
read -p 'You should add your GPG key to GitHub now. Press any key to continue...'
# Install packages required to add custom repositories and clone dotfiles
sudo apt-get update
sudo apt-get -y install apt-transport-https curl gnupg-agent ca-certificates software-properties-common git
sudo apt-get -y install python3 python3-pip
# Install my collection of dotfiles
git clone git@github.com:fabbrito/dotfiles.git ~/.dotfiles
~/.dotfiles/install.sh
# Add custom repositories
# Docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
# Install new packages
sudo apt-get update
# Packages
packages=(
docker-ce
docker-ce-cli
containerd.io
docker-compose
fonts-firacode
htop
terminator
)
sudo apt-get -y install ${packages[@]}
# Bpytop latest version
pip3 install bpytop --upgrade
# Install packages that are available via snapd
sudo snap install --classic code
# Don't require sudo for Docker
sudo groupadd docker
sudo usermod -aG docker $USER
# Install NVM and Node
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
source ~/.bashrc
nvm install node
# # Install zsh
# sudo apt-get -y install zsh zsh-syntax-highlighting
# # Install oh-my-zsh
# sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# # Install some sweet terminal themes
# read -p 'The next command will ask you to choose which terminal themes you want. I recommend "100 101 140 149 151". Press any key to continue...'
# bash -c "$(wget -qO- https://git.io/vQgMr)"
# Add GPG signing key to git
git config --global user.signingkey $new_key
# Update all other packages
sudo apt-get -y dist-upgrade
# OMG FINALLY
echo 'ALL DONE!'
echo ''
echo '▒▒▒▒▒▒▒▒█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ '
echo '▒▒▒▒▒▒▒█░▒▒▒▒▒▒▒▓▒▒▓▒▒▒▒▒▒▒░█ '
echo '▒▒▒▒▒▒▒█░▒▒▓▒▒▒▒▒▒▒▒▒▄▄▒▓▒▒░█░▄▄ '
echo '▒▒▄▀▀▄▄█░▒▒▒▒▒▒▓▒▒▒▒█░░▀▄▄▄▄▄▀░░█ '
echo '▒▒█░░░░█░▒▒▒▒▒▒▒▒▒▒▒█░░░░░░░░░░░█ '
echo '▒▒▒▀▀▄▄█░▒▒▒▒▓▒▒▒▓▒█░░░█▒░░░░█▒░░█ '
echo '▒▒▒▒▒▒▒█░▒▓▒▒▒▒▓▒▒▒█░░░░░░░▀░░░░░█ '
echo '▒▒▒▒▒▄▄█░▒▒▒▓▒▒▒▒▒▒▒█░░█▄▄█▄▄█░░█ '
echo '▒▒▒▒█░░░█▄▄▄▄▄▄▄▄▄▄█░█▄▄▄▄▄▄▄▄▄█ '
echo '▒▒▒▒█▄▄█░░█▄▄█░░░░░░█▄▄█░░█▄▄'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment