-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap.sh
234 lines (189 loc) · 5.94 KB
/
bootstrap.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
230
231
232
233
234
#
# Bootstrap File for Mac Installations
#
# copyright Robert Hoppe - nodemash.com
#
# clear first the shell
clear
# post first some info
echo "=========================================================="
echo "Starting now OSX Bootstrap of Robert Hoppe"
echo " "
echo "Repository: https://github.com/roberth1988/osx-bootstrap"
echo "=========================================================="
echo " "
echo " "
echo "The Bootstrapping will start ing 10 seconds."
wait 10
# lets call xcode first
xcode-select --install
# install first homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# export paths
export PATH=/usr/local/bin:$PATH
brew install \
git \
wget \
python \
tree \
sshuttle \
watch \
redis \
libxml2 \
libyaml \
mysql \
node \
openssl \
pcre \
speedtest_cli \
figlet \
htop \
dialog \
httpie \
wrk \
fzf \
go \
lnav
# display arrangement
brew tap jakehilborn/jakehilborn && brew install displayplacer
# add mongodb
brew tap mongodb/brew
brew install [email protected]
# add duf
brew tap muesli/tap
brew install duf
# vim special
brew install macvim
# zsh special
brew tap homebrew/services
brew install zsh
brew install zsh-completions
# kubernetes specific
brew install kube-ps1 \
kubectx \
stern \
derailed/k9s/k9s \
derailed/popeye/popeye \
sunny0826/tap/kubecm
# install cask
brew install cask
brew cask install java
# add glance quicklook plugin
# You must start /Applications/Glance.app once manually to setup the QuickLook plugin.
brew cask install glance
# Golang specific stuff
brew tap go-swagger/go-swagger
brew install go-swagger
# install necessary pip modules
pip install progressbar \
pyOpenSSL \
requests \
dnspython \
lxml \
py3dns \
regex \
csvkit \
pyaml \
Flask \
awesome-slugify \
beautifulsoup4 \
vatnumber \
PyExecJS \
futures \
Sphinx \
chardet \
redis \
deepdiff \
fuzzywuzzy \
python-Levenshtein \
tldextract \
raven \
microdata \
ngram \
pyparsing \
statsd \
blinker \
pycountry \
simplejson \
suds-jurko \
powerline-status
# some folder stuff
mkdir .ssh
# Ask for the administrator password upfront
echo "We need super-user rights to continue the installation"
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# setup default shell to zsh
echo "Setting zsh as default shell"
if ! grep -q zsh /etc/shells; then
echo "/usr/local/bin/zsh" | sudo tee -a /etc/shells
fi
chsh -s /usr/local/bin/zsh
# switch now to zsh
/usr/local/bin/zsh
# setup computer name
sudo scutil --set ComputerName "RobsMac"
sudo scutil --set HostName "RobsMac"
sudo scutil --set LocalHostName "RobsMac"
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "robsmac"
# Key Repeating
defaults write -g ApplePressAndHoldEnabled -bool false
defaults write -g InitialKeyRepeat -int 20
defaults write -g KeyRepeat -int 1
# Mission Control
defaults write com.apple.dock expose-animation-duration -float 0.15
killall Dock
# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
# Disable the crash reporter
defaults write com.apple.CrashReporter DialogType -string "none"
# Restart automatically if the computer freezes
systemsetup -setrestartfreeze on
# Reveal IP address, hostname, OS version, etc. when clicking the clock
# in the login window
sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName
# Turn off keyboard illumination when computer is not used for 5 minutes
defaults write com.apple.BezelServices kDimTime -int 300
# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Disable disk image verification
defaults write com.apple.frameworks.diskimages skip-verify -bool true
defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
# Use list view in all Finder windows by default
# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
# Don’t group windows by application in Mission Control
# (i.e. use the old Exposé behavior instead)
defaults write com.apple.dock expose-group-by-app -bool false
# Enable Safari’s debug menu
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
# Enable the Develop menu and the Web Inspector in Safari
defaults write com.apple.Safari IncludeDevelopMenu -bool true
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true
# Only use UTF-8 in Terminal.app
defaults write com.apple.terminal StringEncodings -array 4
# Disable game center cruft
defaults write com.apple.gamed Disabled -bool true
# Disable ext change warning
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Get dotfile package manager ellipsis.sh
curl -L ellipsis.sh | sh
# load ellipsis to path
export PATH=~/.ellipsis/bin:$PATH
# install custom settings
dialog --title "Install dotfiles" \
--backtitle "ellipsis install roberth1988/files " \
--yesno "Do you want to install the roberth1988/files?" 7 60
response=$?
case $response in
0) ellipsis install roberth1988/files && $(brew --prefix)/opt/fzf/install;;
1) echo "Boostrapping done";;
255) echo "[ESC] key pressed.";;
esac