Skip to content

Instantly share code, notes, and snippets.

@yangadam
Last active June 3, 2021 17:21
Show Gist options
  • Save yangadam/ead1b5be7cd3cf1c783ec66ea370ea47 to your computer and use it in GitHub Desktop.
Save yangadam/ead1b5be7cd3cf1c783ec66ea370ea47 to your computer and use it in GitHub Desktop.
#!/bin/bash
### Setup SSH key
# https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
echo "Creating an ed25519 SSH key..."
ssh-keygen -t ed25519
# Note: If you are using a legacy system that doesn't support the Ed25519 algorithm, use:
echo "Creating an RSA SSH key..."
ssh-keygen -t rsa -b 4096
echo "Add SSH keys to ssh-agent"
eval "$(ssh-agent -s)"
ssh-add -K ~/.ssh/id_ed25519
ssh-add -K ~/.ssh/id_rsa
### Setup Homebrew
# Install xcode command line tools
echo "Installing xcode-stuff"
xcode-select --install
# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
echo "Updating homebrew..."
brew update
### Setup Git
echo "Setup Git"
echo "Installing Git..."
brew install git
echo "Git config"
git config --global user.name "Adam Yang"
git config --global user.email adam.yang@airwallex.com
echo "Installing git utilities..."
brew install git-extras
brew install git-filter-repo
brew install git-flow
brew install git-crypt
brew install git-lfs
brew install git-gui
brew install legit
brew install tig
### Setup GitHub
echo "Installing GitHub utilities..."
brew install hub
brew install gh
gh auth login
# https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account
echo "Add SSH key to GitHub"
gh ssh-key add ~/.ssh/id_ed25519
### Setup oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
echo "https://sourabhbajaj.com/mac-setup/SystemPreferences/"
echo "******************************************************"
echo "Remove workspace auto-switching"
defaults write com.apple.dock workspaces-auto-swoosh -bool NO
echo "Restart the Dock process"
killall Dock
echo "Enable show hidden files"
defaults write com.apple.finder AppleShowAllFiles TRUE
echo "Enable Cut in Finder"
defaults write com.apple.finder AllowCutForItems YES
echo "Restart the Finder process"
killall Finder
echo "******************************************************"
brew cask install iterm2
brew install bash
brew install zsh
chsh -s /usr/local/bin/zsh;
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
sed -i .bak -E 's/^plugins=(.*)$/plugins=(zsh-completions zsh-autosuggestions zsh-syntax-highlighting zsh-history-substring-search git docker autojump)/' ~/.zshrc
brew install autojump
echo "[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh" >> ~/.zshrc
autoload -U compinit && compinit
### The Ultimate vimrc
brew install vim
git clone https://github.com/amix/vimrc.git ~/.vim_runtime
sh ~/.vim_runtime/install_awesome_vimrc.sh
# sh ~/.vim_runtime/install_basic_vimrc.sh
cd ~/.vim_runtime && git pull --rebase && cd -
### Maximum Awesome
# git clone https://github.com/square/maximum-awesome.git
# cd maximum-awesome
# rake
# cd .. && rm -rf maximum-awesome
brew install duti #changes default file permissions
brew tap adoptopenjdk/openjdk
brew cask install adoptopenjdk
brew cask install adoptopenjdk8
brew cask install adoptopenjdk9
brew cask install adoptopenjdk11
echo 'export JAVA_HOME=$(/usr/libexec/java_home -v 11)' >> ~/.zshrc
# adns
# asciinema Record and share terminal sessions
# autojump
# bash
# dive
# duti
# gdbm
# gettext GNU internationalization (i18n) and localization (l10n) library
# git
# git-crypt
# git-flow
# gmp
# gnupg
# gnutls
# go
# gradle
# groovysdk
# htop
# hub
# icu4c
# iproute2mac
# jemalloc
# jenv
# kafkacat
# kotlin
# libassuan
# libevent
# libffi
# libgcrypt
# libgpg-error
# libidn2
# libksba
# librdkafka
# libtasn1
# libtermkey
# libunistring
# libusb
# libuv
# libvterm
# libyaml
# libzip
# lua
# luajit
# lz4
# lzlib
# maven
# msgpack
# ncurses
# neovim
# newman
# nettle
# node
# node@8
# npth
# openssl
# openssl@1.1
# p11-kit
# pandoc
# pcre
# pcre2
# perl
# pinentry
# pkg-config
# pritunl-ssh
# python
# readline
# ruby
# sonar-scanner
# springboot
# sqlite
# thefuck
# tig
# tldr
# unbound
# unibilium
# vim
# wget
# xz
# yajl
# yarn
# zsh
# zstd
# adoptopenjdk
# adoptopenjdk11
# adoptopenjdk8
# alfred
# anaconda
# appcleaner
# atom
# baidunetdisk
# cisco-proximity
# dash
# datagrip
# docker
# firefox
# flux
# google-chrome
# google-chrome-canary
# intellij-idea
# iterm2
# kindle
# licecap
# microsoft-office
# neteasemusic
# postman
# pritunl
# proxifier
# pycharm
# shadowsocksx-ng
# sketch
# slack
# smcfancontrol
# the-unarchiver
# typora
# visual-studio-code-insiders
# webstorm
# wechat
# wireshark
# xmind-zen
# yinxiangbiji
# youdaonote
# zeplin
# zoomus
#!/bin/bash
echo "******************************************************"
echo "Enable show hidden files"
defaults write com.apple.finder AppleShowAllFiles YES
echo "Enable Cut in Finder"
defaults write com.apple.finder AllowCutForItems YES
echo "******************************************************"
echo "Installing apps with brew and cask "
if [ ! -x /usr/local/bin/brew ]; then
echo "installing homebrew"
/usr/bin/env ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
echo "homebrew is installed"
fi
echo "Installing Cask "
brew install caskroom/cask/brew-cask
echo "Updating app lists"
brew update
brew upgrade
# so that we can have versions
brew tap caskroom/versions
brew install bash #v4
brew install duti #changes default file permissions
brew install the_silver_searcher #search https://github.com/ggreer/the_silver_searcher
brew cask install the-unarchiver #uzip and stuff
brew cask install keka #zip/unzip and much more
#dev stuff
brew cask install java
brew install tree
brew install coreutils
brew install wget
brew install go
brew install maven
brew install ant
brew install jenv
brew install gradle
brew install jq #json command line
brew install asciinema #record terminal sessions
brew install httpie
brew install wrk # HTTP benchmarking tool
brew cask install intellij-idea
brew cask install sourcetree # git client
brew cask install tower
brew cask install diffmerge #use along with sourcetree
brew cask install github-desktop #github desktop client
brew cask install slack #collaboration tool
brew cask install sublime-text #text editor
brew cask install macdown #markdown
brew cask install jd-gui #java decompiler
brew cask install fish #shell very nice!
brew cask install flux #control the screen contrast/brightness over the day
brew cask install iterm2
brew cask install postman # rest client
brew cask install docker
brew install kubectl # kubernetes
brew install tig
brew install glances #like top much better
#Containers and stuff
brew cask install vagrant #vagrant vm provisioning
brew cask install vagrant-manager #excellent GUI app for vagrant
brew cask install packer #tool to create vms
brew cask install virtualbox #tool to create vms
#kodi-raspberry
brew cask install applepi-baker
#Browsers
brew cask install firefox
brew cask install google-chrome
brew cask install google-photos-backup
brew cask install torbrowser
# Cloud drives
brew cask install dropbox
brew cask install google-drive
#Office stuff
brew cask install libreoffice
brew cask install 1password
#Instant Messengers
brew cask install skype
brew cask install adium
brew cask install whatsapp
brew cask install goofy #facebook
#torrent client
brew cask install utorrent
brew cask install spotify
#anti malware
brew cask install malwarebytes-anti-malware
brew cask install onyx
brew cask install 1password
#subtitles
brew cask install subtitles
#game Section
brew cask install battle-net #I need to play wow
brew cask install wowmatrix #to install addons to wow!
brew cask install steam #steam client
#macosx specific
brew cask install alfred #of course alfred!
brew cask install menumeters #menu meters for mac
brew cask install appcleaner #install/ uninstall for mac
brew cask install karabiner #keyboard -shortcut manager for mac
brew cask install captur
#media players
brew cask install vlc
brew cask install mplayerx
#book readers
brew cask install kindle
#remote control
brew cask install teamviewer
brew cask install screenhero
brew cleanup;
brew cask cleanup;
chsh -s /usr/local/bin/bash; #change to bash4, remember to add it to iTerm `/usr/local/bin/bash --login`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment