#Sublime Text
sudo mkdir -p "/usr/local/bin/" && ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" "/usr/local/bin/subl"
import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'
git clone git://github.com/buymeasoda/soda-theme.git ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Theme\ -\ Soda
{
"close_windows_when_empty": true,
"default_encoding": "UTF-8",
"font_face": "Source Code Pro Light",
"font_size": 14,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
],
"margin": 2,
"open_files_in_new_window": false,
"show_full_path": true,
"show_tab_close_buttons": true,
"soda_classic_tabs": false,
"soda_folder_icons": true,
"spell_check": true,
"tab_size": 4,
"theme": "Soda Dark.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"use_simple_full_screen": true,
"word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?",
"rulers": [80]
}
git clone https://github.com/mgmilcher/dotfiles.git && cd dotfiles && ./sync.sh
subl ~/.zshrc
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="candy"
plugins=(git osx rails3 ruby github node npm brew)
source $ZSH/oh-my-zsh.sh
export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mysql/bin:/usr/X11/bin
#test connection
ssh -T [email protected]
#set git config values
git config --global user.name "Marius Milcher"
git config --global user.email "[email protected]"
git config --global github.user mgmilcher
git config --global core.editor "subl -w"
git config --global color.ui true
brew install python --framework --universal
Add into your ~/.zshrc
export PATH=/usr/local/share/python:$PATH
Change system symlinks
cd /System/Library/Frameworks/Python.framework/Versions
sudo rm Current
ln -s /usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/Current
easy_install pip
pip install virtualenv
pip install virtualenvwrapper
Source virtualenvwrapper script
source /usr/local/bin/virtualenvwrapper.sh
#Git
ssh-keygen -t rsa -C "[email protected]"
#copy ssh key to github.com
subl ~/.ssh/id_rsa.pub
#test connection
ssh -T [email protected]
#set git config values
git config --global user.name "Bohdan Viter"
git config --global user.email "[email protected]"
git config --global github.user g3d
git config --global github.token your_token_here
git config --global core.editor "subl -w"
git config --global color.ui true
#Server
sudo scutil --set HostName Work
brew install dnsmasq
mkdir -p /usr/local/etc/ &&
echo "address=/build/127.0.0.1" >> /usr/local/etc/dnsmasq.conf &&
echo "address=/stage/192.168.10.200" >> /usr/local/etc/dnsmasq.conf &&
echo "listen-address=127.0.0.1" >> /usr/local/etc/dnsmasq.conf
sudo cp "/usr/local/Cellar/dnsmasq/2.57/homebrew.mxcl.dnsmasq.plist" "/Library/LaunchDaemons" &&
sudo launchctl load -w "/Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist"
sudo -s
sudo mkdir -p /etc/resolver
sudo echo 'nameserver 127.0.0.1' > /etc/resolver/build
#flush cache
dscacheutil -flushcache
#ensure it works
scutil --dns
brew install mysql
#setup daemon
mkdir -p ~/Library/LaunchAgents && cp /usr/local/Cellar/mysql/5.5.20/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/ && launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
#Set up databases to run as your user account
unset TMPDIR && mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
#start mysql
mysql.server start
#secure mysql
/usr/local/Cellar/mysql/5.5.20/bin/mysql_secure_installation
brew install nginx
Configure your /usr/local/etc/nginx/nginx.conf
(similar to):
server {
listen 80;
server_name localhost;
root /path/to/phpfiles;
index index.php index.html index.htm;
location / {
# http://www.ruby-forum.com/topic/187939
# error_page 405 = $uri;
}
location ~ .php {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /path/to/phpfiles$fastcgi_script_name;
}
}
Start nginx:
/usr/local/sbin/nginx -c /usr/local/etc/nginx/nginx.conf