Skip to content

Instantly share code, notes, and snippets.

@AlmogBaku
Last active May 30, 2024 04:28
Show Gist options
  • Save AlmogBaku/97e8514a93350340bfff384f9910b690 to your computer and use it in GitHub Desktop.
Save AlmogBaku/97e8514a93350340bfff384f9910b690 to your computer and use it in GitHub Desktop.
New environment

Installations required on a new environment

  1. Install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. Install Xcode Command Line Tools

    1.  xcode-select --install
    2. Then, accept the license terms, and install necassary dependencies
      sudo xcodebuild -license accept
      brew install openssl readline sqlite3 xz zlib tcl-tk
  2. Setup your console:

    1. Install zsh and fonts
      brew install zsh
      brew tap homebrew/cask-fonts
      brew install --cask font-fira-code
      chsh -s /bin/zsh
    2. Change your terminal font to Fira Code
    3. Install go and antibody
      brew install go
      go install github.com/getantibody/antibody@latest
    4. Setup your ~/.zshrc
      ## ~/.zshrc
      
      # Go
      export GOPATH=$HOME/go
      export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"
      
      # Antibody
      source <(antibody init)
      antibody bundle < ~/.zsh_plugins.txt
      
      # Pinentry
      alias pinentry='pinentry-mac'
      
      # PGP
      export GPG_TTY=$(tty)
      
      # JDK
      export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"
      
      # PyEnv
      export PYENV_ROOT="$HOME/.pyenv"
      command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
      eval "$(pyenv init -)"
      
      [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
      
      # LUAROCKS
      eval "$(luarocks path --bin)"
      
      # bun completions
      [ -s "/Users/almogbaku/.bun/_bun" ] && source "/Users/almogbaku/.bun/_bun"
      
      # bun
      export BUN_INSTALL="$HOME/.bun"
      export PATH="$BUN_INSTALL/bin:$PATH"
      
      # CARGO
      export PATH="$HOME/.cargo/bin:$PATH"
    5. Install Fzf
      brew install fzf
      /opt/homebrew/opt/fzf/install
      
    6. Configure zsh plugins in ~/.zsh_plugins.txt:
      # ~/.zsh_plugins.txt
      
      AlmogBaku/kubectx branch:patch-1 path:completion kind:fpath # <-- this MUST be before ohmyzsh
      ohmyzsh/ohmyzsh
      
      # Bundles from the default repo (robbyrussell's oh-my-zsh)
      ohmyzsh/ohmyzsh path:plugins/git
      ohmyzsh/ohmyzsh path:plugins/colorize
      ohmyzsh/ohmyzsh path:plugins/python
      ohmyzsh/ohmyzsh path:plugins/macos
      ohmyzsh/ohmyzsh path:plugins/golang
      ohmyzsh/ohmyzsh path:plugins/redis-cli
      ohmyzsh/ohmyzsh path:plugins/virtualenv
      ohmyzsh/ohmyzsh path:plugins/command-not-found
      ohmyzsh/ohmyzsh path:plugins/docker
      ohmyzsh/ohmyzsh path:plugins/common-aliases
      ohmyzsh/ohmyzsh path:plugins/docker-compose
      ohmyzsh/ohmyzsh path:plugins/helm
      ohmyzsh/ohmyzsh path:plugins/kubectl
      ohmyzsh/ohmyzsh path:plugins/mvn
      ohmyzsh/ohmyzsh path:plugins/python
      ohmyzsh/ohmyzsh path:plugins/ssh-agent
      ohmyzsh/ohmyzsh path:plugins/terraform
      ohmyzsh/ohmyzsh path:plugins/pip
      ohmyzsh/ohmyzsh path:plugins/lein
      ohmyzsh/ohmyzsh path:plugins/common-aliases
      ohmyzsh/ohmyzsh path:plugins/compleat
      ohmyzsh/ohmyzsh path:plugins/git-extras
      ohmyzsh/ohmyzsh path:plugins/git-flow
      ohmyzsh/ohmyzsh path:plugins/npm
      ohmyzsh/ohmyzsh path:plugins/web-search
      ohmyzsh/ohmyzsh path:plugins/z
      ohmyzsh/ohmyzsh path:plugins/fzf
      
      # Extra zsh completions
      zsh-users/zsh-completions
      zsh-users/zsh-autosuggestions
      zsh-users/zsh-syntax-highlighting
      zsh-users/zsh-history-substring-search
      
      
      # Theme
      denysdovhan/spaceship-zsh-theme
      
    7. start a new console to see the changes
  3. Install the following

brew install nano yq
sudo ln -s /opt/homebrew/bin/nano /usr/local/bin/pico

brew install pyenv
pyenv install 3.12
pyenv global 3.12

brew install zsh go aws-iam-authenticator awscli gnupg golangci-lint helm kind kubernetes-cli node corepack \
java pyenv tree virtualenv pre-commit protobuf bufbuild/buf/buf
brew link corepack
corepack enable
corepack prepare yarn@stable --activate

mkdir $ZSH/completions/
kind completion zsh > $ZSH/completions/_kind

brew tap hashicorp/tap
hashicorp/tap/vault

brew tap weaveworks/tap
brew install weaveworks/tap/eksctl

brew install --cask docker
  1. Create SSH Key
  2. Create GPG Signature
    1. Don't forget git config --global commit.gpgSign true !
  3. Install JetBrains Toolbox
    brew install --cask jetbrains-toolbox
  4. Install pinentry for gpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment