Skip to content

Instantly share code, notes, and snippets.

@carnevlu
Created June 12, 2018 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carnevlu/6781ec442d8f6aa09aa93f2e86dc07ba to your computer and use it in GitHub Desktop.
Save carnevlu/6781ec442d8f6aa09aa93f2e86dc07ba to your computer and use it in GitHub Desktop.
OSX Brew
#!/bin/bash
printeval() { test $# -gt 0 && echo $@ && eval $@; }
upstall() { type -P $1 || printeval $2 && printeval $3; }
addset() { grep -q "^$1" $3 && sed -i "" "s/^$1.*/$1=$2/" $3 || echo "$1=$2" >> $3; }
xcode-select --install
upstall brew 'ruby -e "$(curl -s https://raw.githubusercontent.com/Homebrew/install/master/install)" && brew tap caskroom/cask'
upstall subl 'brew cask install sublime-text-dev && brew cask install subl'
upstall alcatraz 'brew cask install alcatraz'
upstall iterm2 'brew cask install iterm2 && brew tap suin/suin && brew install iterm2-cli'
upstall omnidisksweeper 'brew cask install omnidisksweeper'
upstall ngrok 'brew cask install ngrok'
upstall appcleaner 'brew cask install appcleaner'
upstall totalfinder 'brew cask install totalfinder'
upstall bartender 'brew cask install bartender'
upstall iconping 'brew cask install iconping'
upstall macpass 'brew cask install macpass'
upstall prey 'brew cask install prey'
upstall rcdefaultapp 'brew cask install rcdefaultapp'
upstall tunnelblick 'brew cask install tunnelblick'
upstall spotify 'brew cask install spotify'
upstall git 'brew install git'
upstall hg 'brew install hg'
upstall wget 'brew install wget'
upstall php 'brew tap homebrew/php && brew install php56 --with-pear php56-xdebug php-code-sniffer php-cs-fixer phpmd'
upstall memcached 'brew install memcached'
upstall mysql 'brew install mysql'
upstall postgres 'brew install postgresql'
upstall composer 'brew install composer'
upstall gpg 'brew install gpg'
upstall gpg-agent 'brew install gpg-agent'
upstall node 'brew install node'
upstall docker 'brew install docker'
upstall python 'brew install python'
upstall ruby 'brew install ruby'
upstall htop 'brew install htop'
upstall parallels 'brew cask install parallels-desktop'
upstall qt5 'brew install qt5 && brew cask install qt-creator'
upstall phonegap 'npm install -g phonegap'
upstall grunt 'npm install -g grunt-cli'
upstall qlcolorcode 'brew cask install qlcolorcode qlstephen qlmarkdown quicklook-json qlprettypatch quicklook-csv betterzipql qlimagesize webpquicklook provisionql'
upstall google-chrome 'brew install chrome-cli && brew cask install google-chrome'
upstall zsh 'brew install zsh && sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"'
upstall fuck 'brew install thefuck && echo eval $(thefuck --alias) >> ~/.zshrc.local'
# Java
upstall java 'brew cask install java'
upstall gradle 'brew install gradle'
# Gem
upstall sass 'gem install sass'
upstall compass 'gem install compass'
upstall ios 'gem install cupertino'
upstall apn 'gem install houston'
upstall ipa 'gem install shenzhen'
# PHP Xdebug
XDEBUG_INI=`php --ini | grep xdebug | sed 's/[^/]*//'`
addset xdebug.remote_enable 1 XDEBUG_INI
addset xdebug.remote_log /var/log/xdebug/xdebug.log XDEBUG_INI
# Sublime Package Dependencies
upstall tidy 'brew install tidy-html5'
upstall jshint 'npm install -g jshint'
upstall cleancss 'npm install -g clean-css'
upstall uglifycss 'npm install -g uglifycss'
upstall js-beautify 'npm install -g js-beautify'
upstall html-minifier 'npm install -g html'
upstall uglifyjs 'npm install -g uglify'
upstall minjson 'npm install -g minjson'
upstall svgo 'npm install -g svgo'
upstall csslint 'npm install -g csslint'
# Ked
# Office (Word / Excel / Powerpoint)
# BetterTouchTool
# Yoink
# Carbon Copy Cleaner
# Hands Off!
# Tuxeda Disk Manager
# Boxy
# TotalFinder SP
#SUBLIME="~/Library/Application Support/Sublime Text 3"
#curl -# 'https://packagecontrol.io/Package%20Control.sublime-package' -o "$SUBLIME/Installed Packages/Package Control.sublime-package"
#"$SUBLIME/Packages/User/Package Control.sublime-settings"
test -d ~/Sites || (chgrp -R _www ~/Sites && chmod -R g+rwx ~/Sites && sudo dseditgroup -o edit -a `whoami` -t user _www)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment