Skip to content

Instantly share code, notes, and snippets.

@lambdaydoty
Last active February 15, 2022 08:25
Show Gist options
  • Save lambdaydoty/eee0f9c0d4c422b9e42abe8e8e7d2c28 to your computer and use it in GitHub Desktop.
Save lambdaydoty/eee0f9c0d4c422b9e42abe8e8e7d2c28 to your computer and use it in GitHub Desktop.
sudo apt-get update

# zsh, oh-my-zsh, zplug
sudo sed -i 's/required/sufficient/g' /etc/pam.d/chsh  # env: `gcp vm`
sudo apt-get install -y git wget zsh && \
  chsh -s $(which zsh) && \
  sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" && \
  (curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh)
mv ~/.zshrc{,.bak}

# dotfiles
echo ".cfg" >> .gitignore && \
  git clone --bare https://github.com/lambdaydoty/dotfiles.git ~/.cfg \
  alias config='$(which git) --git-dir=$HOME/.cfg/ --work-tree=$HOME'
config checkout
config config --local status.showUntrackedFiles no
config config --local user.email <email>
config config --local user.name lambdaydoty
config remote set-url origin git@github.com:lambdaydoty/dotfiles.git
ssh-keygen -t ed25519 -f ~/.ssh/id_github -E md5 && cat .ssh/id_github.pub
eval `ssh-agent -s` > /dev/null && (grep -slR "PRIVATE" ~/.ssh | xargs ssh-add)
config pull

# docker
sudo apt-get install -y ca-certificates gnupg lsb-release && \
  (curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg) && \
  (echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null)
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
sudo groupadd docker
sudo usermod -aG docker $USER && newgrp docker
docker run hello-world

# docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version

# gcc
sudo apt install -y build-essential manpages-dev && gcc --version

# zsh custom plugins
git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions

# tmux jq
sudo apt-get install -y tmux jq 
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm   # then in tmux: [prefix] + I

# node
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash # logout/login
nvm current && nvm install v14 && node --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment