Skip to content

Instantly share code, notes, and snippets.

@ikhoon
Last active September 21, 2022 02:21
Show Gist options
  • Save ikhoon/880354dc58b48c7837972e203583699b to your computer and use it in GitHub Desktop.
Save ikhoon/880354dc58b48c7837972e203583699b to your computer and use it in GitHub Desktop.
#!/bin/bash
# zsh
echo "Installing zsh..."
chsh -s `which zsh`
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
# homebrew, pip
echo "Installing homebrew, pip..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
if ! [ -x "$(command -v brew)" ]; then
  echo 'Error: brew is not installed.' >&2
  exit 1
fi
# devtools
echo "Installing java, scala, python... etc"
brew install asdf
asdf plugin-add java https://github.com/halcyon/asdf-java.git
brew install scala
brew install sbt
brew install python3
brew install pip
brew install ammonite
brew install gradle
brew install node
brew install ansible
brew install fzf
/usr/local/opt/fzf/install
brew install tmux
brew install direnv
brew install pyenv
brew install reattach-to-user-namespace
brew install the_silver_searcher
brew install gpg
brew install tig
brew install yarn
brew install tree
brew install rg
### oh my tmux
git clone https://github.com/gpakosz/.tmux.git ~/.tmux
ln -s -f .tmux/.tmux.conf ~/.tmux.conf
brew tap homebrew/cask-fonts
brew cask install font-hack-nerd-font
# utilities
echo "Installing utilities..."
brew install jenv
brew install pandoc
# osx app
brew install --cask google-chrome
brew install --cask firefox
brew install --cask slack
brew install --cask 1password
brew install --cask intellij-idea
brew install --cask KeepingYouAwake
brew install --cask spectacle
brew install --cask docker
brew install --cask iTerm2
brew install --cask sublime-text
brew install --cask sourcetree
brew install --cask google-backup-and-sync
brew install --cask trailer
brew install --cask macvim
brew install --cask emacs
brew install --cask pliim
# git config
echo "Installing git..."
brew install git
if ! [ -x "$(command -v git)" ]; then
  echo 'Error: git is not installed.' >&2
  exit 1
fi
read -p 'name: ' name
read -p 'email: ' email
git config --global user.name $name
git config --global user.email $email
ssh-keygen -t rsa -C $email
eval "$(ssh-agent -s)"
ssh-add $HOME/.ssh/id_rsa
pbcopy < $HOME/.ssh/id_rsa.pub
echo "Copied ssh key to clipboard. Please paste to github settings."
open "https://github.com/settings/ssh/new"
echo "GSSAPIAuthentication yes" >> $HOME/.ssh/config
@ikhoon
Copy link
Author

ikhoon commented Sep 21, 2022

Utility methods to search and install Java distributions using FZF

java_install() {
   JAVA_VERSION=$(asdf list all java | awk '{ print $1 }' | fzf)
   asdf install java $JAVA_VERSION
}

java_use() {
  JAVA_VERSION=$(asdf list java | awk '{ print $1 }' | fzf)
  echo "Use $JAVA_VERSION"
  asdf local java $JAVA_VERSION
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment