-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
229 lines (192 loc) Β· 7.81 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
#!/bin/bash
# Show all hidden files by default
defaults write com.apple.finder AppleShowAllFiles YES
# Create .bash_profile
touch ~/.bash_profile
# Upgrade build-in PHP to 7.2 version
# Password is required for this installation
curl -s https://php-osx.liip.ch/install.sh | bash -s 7.2
# Remove override php.ini values set by Liip.ch
# Password is required for this action
sudo rm /usr/local/php5/php.d/99-liip-developer.ini
# Adjust PATH to include PHP 7.2
echo "export PATH=/usr/local/php5/bin:$PATH" >> ~/.bash_profile
# Install PHP Composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
# Move PHP Composer to PATH
mv composer.phar /usr/local/bin/composer
# Install nvm
# https://github.com/creationix/nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
echo "source ~/.nvm/nvm.sh" >> ~/.bash_profile
# Install Node.js 8.9.4
nvm install 8.9.4
# Set Node.js 8.9.4 as default version using
nvm use 8.9.4
nvm alias default 8.9.4
# Update npm
npm install -g npm
# Install Homebrew
# Password is required for this installation
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Opting out Homebrew analytics
brew analytics off
# Keep Homebrew packages up-to-date
brew update && brew upgrade
# Install Golang 1.9
brew install [email protected]
# Install Homebrew packages
brew install git
brew install git-lfs
brew install git-standup
brew install mas
brew install watchman # for create-react-native-app
brew install wget
brew install zsh zsh-completions
# Link git to version installed by Homebrew (Should already linked)
brew link git
# Set git username and email
git config --global user.name "Andrew Mok"
git config --global user.email "[email protected]"
# Install oh-my-zsh
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
# Clone Auto Suggestions for Oh My ZSH
# Will be installed by syncing settings below
git clone git://github.com/zsh-users/zsh-autosuggestions $HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions
# Sync .zshrc settings first
rm -f "$HOME/.zshrc"
ln -sf "$HOME/dotfiles/zsh/.zshrc" "$HOME/.zshrc"
# echo "source ~/.bash_profile" >> $HOME/dotfiles/zsh/.zshrc
# Install Powerline fonts
git clone https://github.com/powerline/fonts.git --depth=1
cd fonts
./install.sh
cd ..
rm -rf fonts
# Homebrew Cask
brew tap caskroom/cask
# Install software via brew cask
# Password is required for first time installation
brew cask install 1password
brew cask install alfred
brew cask install docker
brew cask install evernote
brew cask install filezilla
brew cask install firefox
brew cask install franz
brew cask install google-backup-and-sync
brew cask install google-chrome
brew cask install google-web-designer
brew cask install imageoptim
brew cask install iterm2
brew cask install kdiff3
brew cask install keepingyouawake
brew cask install kitematic
brew cask install microsoft-office
brew cask install phpstorm
brew cask install postman
brew cask install pritunl
brew cask install pritunl
brew cask install robo-3t
brew cask install sequel-pro
brew cask install sip
brew cask install skype
brew cask install slack
brew cask install sourcetree
brew cask install spotify
brew cask install virtualbox
brew cask install visual-studio-code
brew cask install vlc
brew cleanup
brew cask cleanup
brew install docker-compose
# Install software via mas
# Apple ID is required to login for this action
# Uncomment the following command for auto sign in
# mas signin [email protected]
mas install 540348655 # Monosnap (3.4.9)
mas install 904280696 # Things3 (3.3)
mas install 568494494 # Pocket (1.6.6)
mas install 1102004240 # iHosts (1.3.0)
# Install npm global packages
npm install -g @angular/cli
npm install -g @pingy/cli
npm install -g create-react-app
npm install -g eslint
npm install -g express-generator
npm install -g firebase-tools
npm install -g gulp-cli
npm install -g react-native-cli
npm install -g create-react-app
npm install -g react-devtools
npm install -g flow-typed
npm install -g standard # Javascript Standard Style
# npm install -g typescript
# npm install -g tslint # need install typescript first
npm install -g vue-cli
# Sync settings in this repo
# Alfred settings
rm -rf "$HOME/Library/Application Support/Alfred 3/Alfred.alfredpreferences"
ln -sf "$HOME/dotfiles/alfred/Alfred.alfredpreferences" "$HOME/Library/Application Support/Alfred 3/Alfred.alfredpreferences"
cd ./alfred/workflow
# Workflow: AlfredSwitchWindows
# https://github.com/mandrigin/AlfredSwitchWindows/releases
curl -O "https://github.com/mandrigin/AlfredSwitchWindows/releases/download/v0.2.8/Swift.Window.Switcher.v0.2.8.alfredworkflow"
# Workflow: JetBrains: Open project
# https://github.com/bchatard/jetbrains-alfred-workflow
curl -O "https://github.com/bchatard/jetbrains-alfred-workflow/blob/master/package/JetBrains%20-%20Open%20project.alfredworkflow?raw=true"
cd ../../
# iTerm2 settings
defaults write com.googlecode.iterm2.plist PrefsCustomFolder -string "~/dotfiles/iterm2"
defaults write com.googlecode.iterm2.plist LoadPrefsFromCustomFolder -bool true
# VS Code settings
rm -f "$HOME/Library/Application Support/Code/User/keybindings.json"
rm -f "$HOME/Library/Application Support/Code/User/settings.json"
rm -f "$HOME/Library/Application Support/Code/User/vsicons.settings.json"
ln -sf "$HOME/dotfiles/vs-code/keybindings.json" "$HOME/Library/Application Support/Code/User/keybindings.json"
ln -sf "$HOME/dotfiles/vs-code/settings.json" "$HOME/Library/Application Support/Code/User/settings.json"
ln -sf "$HOME/dotfiles/vs-code/vsicons.settings.json" "$HOME/Library/Application Support/Code/User/vsicons.settings.json"
# Install VS Code Extension
code --install-extension bradgashler.htmltagwrap
code --install-extension christian-kohler.path-intellisense
code --install-extension dbaeumer.vscode-eslint
code --install-extension dbankier.vscode-quick-select
code --install-extension donjayamanne.githistory
code --install-extension donjayamanne.jquerysnippets
code --install-extension eamodio.gitlens
code --install-extension EditorConfig.EditorConfig
code --install-extension eg2.tslint
code --install-extension esbenp.prettier-vscode
code --install-extension felixfbecker.php-debug
code --install-extension felixfbecker.php-intellisense
code --install-extension felixfbecker.php-pack
code --install-extension hollowtree.vue-snippets
code --install-extension HookyQR.beautify
code --install-extension jeremyrajan.vscode-lebab
code --install-extension johnpapa.Angular2
code --install-extension k--kato.intellij-idea-keybindings
code --install-extension leizongmin.node-module-intellisense
code --install-extension lonefy.vscode-JS-CSS-HTML-formatter
code --install-extension mkaufman.HTMLHint
code --install-extension ms-vscode.azure-account
code --install-extension ms-vscode.node-debug2
code --install-extension nwallace.language-vscode-javascript-angular2
code --install-extension onecentlin.laravel-blade
code --install-extension PeterJausovec.vscode-docker
code --install-extension robertohuertasm.vscode-icons
# code --install-extension small.php-ci
code --install-extension steoates.autoimport
code --install-extension traBpUkciP.vscode-npm-scripts
code --install-extension TwentyChung.jsx
code --install-extension vsmobile.vscode-react-native
code --install-extension Zignd.html-css-class-completion
# Change deafult shell to zsh
# Password is required for this action
sudo sh -c "echo $(which zsh) >> /etc/shells"
chsh -s $(which zsh)
exec $SHELL --login