-
-
Save j16h/aa010e5b19e1e335b4a51a7baeb5c68f to your computer and use it in GitHub Desktop.
| #!/bin/bash #Explicitly tell shell this is a bash script | |
| set -e #Exit as soon as any line in the bash script fails | |
| set -x #Prints each command executed (prefix with ++) | |
| #set -ex #Do both (for good practice) | |
| brews=( | |
| #caskroom/cask/brew-cask #for some casks like sublime-text3 - doesnt work | |
| bash | |
| #git | |
| git-extras | |
| #go | |
| #gpg | |
| hh #zsh and bash history suggestbox | |
| htop | |
| httpie #CLI HTTP client, user-friendly curl replacement with intuitive UI, JSON support, syntax highlighting | |
| iftop #iftop does for network usage what top(1) does for CPU usage. listens to nw traffic on a named interface and displays a table of current bandwidth usage by pairs of hosts. | |
| lnav #log file navigator | |
| gpg #http://blog.ghostinthemachines.com/2015/03/01/how-to-use-gpg-command-line/ | |
| #macvim | |
| nmap | |
| node #npm is install along | |
| #python | |
| python3 | |
| #stormssh | |
| #tmux | |
| tree | |
| #wget | |
| watchman #react-native setup | |
| ) | |
| casks=( | |
| adobe-reader | |
| #totalfinder | |
| commander-one #dual pane file management | |
| #atom | |
| teamviewer | |
| #cakebrew #ui for homebrew | |
| cleanmymac | |
| caffeine | |
| #datagrip | |
| dockertoolbox | |
| #docker-for-mac #doesnt work | |
| dropbox | |
| evernote | |
| firefox | |
| #franz #messaging client for all | |
| hipchat | |
| google-chrome | |
| google-drive | |
| #github-desktop | |
| #hosts | |
| #handbrake #The open source video transcoder | |
| #intellij-idea | |
| webstorm | |
| #blocs #fails | |
| # istat-menus #paid | |
| #istat-server | |
| #licecap #LICEcap can capture an area of your desktop and save it directly to .GIF | |
| iterm2 | |
| qlcolorcode #quick look syntax highlighting | |
| #qlmarkdown #QuickLook generator for Markdown files | |
| #qlstephen # view plain text files without a file extension | |
| quicklook-json # view json and expand collapse nodes | |
| #quicklook-csv | |
| launchrocket # Mac PreferencePane for managing services with launchd | |
| #sublime-text3 #doesnt work | |
| sublime-text | |
| visual-studio-code | |
| #microsoft-office | |
| private-eye #When an app makes a network connection, you see it instantly on your screen. | |
| #satellite-eyes #utomatically changes your desktop wallpaper to the satellite view of where you are, right now. | |
| skype | |
| slack | |
| shiftit | |
| #steam | |
| #tunnelbear | |
| vlc | |
| #sketch #via helpdesk | |
| #volumemixer #app specific volume control | |
| ) | |
| pips=( | |
| #glances | |
| ) | |
| pips3=( | |
| stups | |
| awscli | |
| zmon-cli | |
| ) | |
| gems=( | |
| bundle | |
| ) | |
| npms=( | |
| kill-tabs # Chrome tab processes are killed | |
| #n # node version management | |
| react-native-cli | |
| react-native-ignite | |
| ) | |
| git_configs=( | |
| #"branch.autoSetupRebase always" | |
| "color.ui auto" | |
| #"core.autocrlf input" | |
| #"core.pager ''" | |
| #"credential.helper osxkeychain" | |
| #"merge.ff false" | |
| #"pull.rebase true" | |
| #"push.default simple" | |
| #"rebase.autostash true" | |
| #"rerere.autoUpdate true" | |
| #"rerere.enabled true" | |
| "user.name julianusti" | |
| "user.email julian.ustiyanovych@gmail.com" | |
| ) | |
| if test ! $(which brew); then | |
| echo "Installing Xcode ..." | |
| xcode-select --install #note: check first xcode-select -p | |
| echo "Installing Homebrew ..." | |
| ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| else | |
| echo "Updating Homebrew ..." | |
| brew update | |
| brew upgrade | |
| fi | |
| export HOMEBREW_NO_ANALYTICS=1 #disable anon analytics | |
| brew doctor | |
| brew tap homebrew/dupes | |
| fails=() | |
| function print_red { | |
| red='\x1B[0;31m' | |
| NC='\x1B[0m' # no color | |
| echo -e "${red}$1${NC}" | |
| } | |
| function install { | |
| cmd=$1 | |
| shift | |
| for pkg in $@; | |
| do | |
| exec="$cmd $pkg" | |
| echo "Executing: $exec" | |
| if $exec ; then | |
| echo "Installed $pkg" | |
| else | |
| fails+=($pkg) | |
| print_red "Failed to execute: $exec" | |
| fi | |
| done | |
| } | |
| # echo "Installing ruby ..." | |
| # brew install ruby-install chruby | |
| # ruby-install ruby | |
| # chruby ruby-2.3.0 | |
| # ruby -v | |
| echo "Installing Java ..." | |
| brew cask install java | |
| echo "Installing packages ..." | |
| brew info ${brews[@]} | |
| install 'brew install' ${brews[@]} | |
| echo "Tapping casks ..." | |
| brew tap caskroom/fonts | |
| brew tap caskroom/versions | |
| echo "Installing software ..." | |
| brew cask info ${casks[@]} | |
| install 'brew cask install --appdir=/Applications' ${casks[@]} | |
| echo "Installing secondary packages ..." | |
| # TODO: add info part of install or do reinstall? | |
| install 'pip install --upgrade' ${pips[@]} | |
| install 'gem install' ${gems[@]} | |
| install 'npm install --global' ${npms[@]} | |
| #install 'brew cask install' ${fonts[@]} | |
| install 'pip3 install --upgrade' ${pips3[@]} | |
| echo "Upgrading bash ..." | |
| sudo bash -c "echo $(brew --prefix)/bin/bash >> /private/etc/shells" | |
| cd; curl -#L https://github.com/barryclark/bashstrap/tarball/master | tar -xzv --strip-components 1 --exclude={README.md,screenshot.png} | |
| source ~/.bash_profile | |
| if [ ! -s ~/.zshrc ] #Check if file has size not greater than 0. | |
| then | |
| #such and such | |
| echo "" | |
| echo "Would you like to install oh-my-zsh? (y/n)" | |
| read -r response | |
| if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then | |
| sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
| source ~/.zshrc | |
| git clone git://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions | |
| grep -F 'source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh' ~/.zshrc || echo 'source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh' >> ~/.zshrc | |
| fi | |
| fi | |
| echo "" | |
| echo "Would you like to set ~/.aws/config for stups/awscli? (y/n)" | |
| read -r response | |
| if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then | |
| mkdir -p ~/.aws | |
| sudo cat >~/.aws/config <<EOL | |
| [default] | |
| region=eu-central-1 | |
| output=json | |
| EOL | |
| grep -F 'export LC_ALL=en_US.utf-8' ~/.zshrc || echo 'export LC_ALL=en_US.utf-8' >> ~/.zshrc | |
| grep -F 'export LANG=en_US.utf-8' ~/.zshrc || echo 'export LANG=en_US.utf-8' >> ~/.zshrc | |
| fi | |
| echo "Setting git defaults ..." | |
| for config in "${git_configs[@]}" | |
| do | |
| git config --global ${config} | |
| done | |
| #gpg --keyserver hkp://pgp.mit.edu --recv ${gpg_key} | |
| #git config --global user.signingkey ${gpg_key} | |
| # echo "Setting up go ..." | |
| # mkdir -p /usr/libs/go | |
| # echo "export GOPATH=/usr/libs/go" >> ~/.bashrc | |
| # echo "export PATH=$PATH:$GOPATH/bin" >> ~/.bashrc | |
| echo "Upgrading ..." | |
| pip3 install --upgrade setuptools | |
| pip3 install --upgrade pip | |
| sudo gem update --system | |
| echo "Cleaning up ..." | |
| brew cleanup | |
| brew cask cleanup | |
| brew linkapps | |
| for fail in ${fails[@]} | |
| do | |
| echo "Failed to install: $fail" | |
| done | |
| echo "If you have macup, Run `mackup restore` after DropBox has done syncing" | |
| echo "install Sip color picker for mac manually" | |
| #read -p "Hit enter to run [OSX for Hackers] script..." c | |
| #sh -c "$(curl -sL https://gist.githubusercontent.com/brandonb927/3195465/raw/osx-for-hackers.sh)" |
vpn setup
- docker setup
- sync notes
- sync chrome bookmarks
- mouse tap and other settings (hotcorner), keyboard key repeat delay
- sublime text and package installer
- oh my zsh plugins
TODO
admin.zalando.net
login: corps/yustiyanovyc
pwd: system pwd
request admin access
hipchat (open franzi app)
server: hipchat.zalando.net
name: zalando
configure vim ~/.zshrc
zshrc config
if you have nvm for node version management
export NVM_DIR="/Users/yustiyanovyc/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
source ~/.nvm/nvm.sh #check if this is needed
- plugins=(git sublime osx scd zsh-autosuggestions)
- for stups change lang env to utf8 (not needed. done by script)
export LC_ALL=en_US.utf-8
export LANG=en_US.utf-8
generate ssh keys:
ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub | pbcopy
sublime text packages:
- update settings: material theme, ignore nodemodules
"theme": "Material-Theme.sublime-theme",
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"]
- bracket highlighter
- GitGutter-Edge
- sidebarFolder, update keymap
[
{"keys": ["super+shift+o"], "command": "side_bar_folders_quick_switch"}
]
es6 syntax highlighting
http://gunnariauvinen.com/getting-es6-syntax-highlighting-in-sublime-text/
android genymotion
https://gist.github.com/ahmed1490/55382836fdc4692991671c67bd6ed577#android-installation-genymotion
brew : android-sdk (needed by react-native)
export ANDROID_HOME=/usr/local/opt/android-sdk
cask: genymotion
react/react-native#2879
install google play services for maps and anything else:
http://stackoverflow.com/a/17243377/2134720
errors
relevant error :
http://stackoverflow.com/a/31379463 (maybe not needed)
If you get this error: (VirtualBox cannot start the virtual device)
http://stackoverflow.com/a/38301312
on react-native run-android if you get > failed to find target with hash string 'android-23' in: /usr/local/opt/android-sdk then:
on commandline type android sdk and install Android 6 (API 23) (maybe just the sdk platform is sufficient), then check ANDROID_HOME/platforms for android-23
error: Could not find com.android.support:appcompat-v7:23.0.1. on react-native run-androidthen: http://stackoverflow.com/a/33023883/2134720
if you get adb: error: could not install smartsocket listener: Address already in use
http://stackoverflow.com/a/35960019/2134720
zalando:
pierone configures ~/.docker/config.json
stups configure
following are the config endpoints.. for pierone... the zign and pierone.yaml is needed. you will be prompted on pierone login
➜ ✗ cat ~/Library/Application\ Support/zign/zign.yaml
{url: 'https://token.auth.zalando.com/access_token', user: yustiyanovyc}
➜ ✗ cat ~/Library/Application\ Support/pierone/pierone.yaml
{url: 'https://pierone.stups.zalan.do'}
➜ ✗ cat ~/Library/Application\ Support/piu/piu.yaml
{even_url: 'https://even.stups.zalan.do'}
pierone.stups.zalan.do/ registry.opensource.zalan.do
token.auth.zalando.com //not working
Mac App Store command line interface
https://github.com/mas-cli/mas
source: https://github.com/pathikrit/mac-setup-script/blob/master/setup.sh
other: https://gist.github.com/t-io/8255711
http://johnstowers.co.nz/pages/bash-cheat-sheet.html