Sublime Text 2 – Useful Shortcuts (Mac OS X)
General
⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
# ubuntu server setup | |
adduser deploy sudo | |
# on your machine | |
# ssh-copy-id deploy@IPADDRESS | |
# ssh deploy@IPADDRESS -i yoursakeyfile | |
# edit /etc/ssh/ssh_config set PasswordAuthentication to 'no' | |
# run service ssh restart to restart ssh |
#!/bin/sh | |
# Ask for the administrator password upfront. | |
sudo -v | |
# homebrew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew update | |
# taps |
#!/bin/sh | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' |
nuke = !git branch -D $1 && git push origin :$1 ( git nuke branch name) |
// Load configurations | |
// if test env, load example file | |
var env = process.env.NODE_ENV || 'development' | |
, config = require('./config/config')[env] | |
, mongoose = require('mongoose') |
#!/bin/bash | |
DOMAIN_ID="" | |
RECORD_ID="" | |
IP="`curl http://icanhazip.com/`" | |
curl -H 'X-DNSimple-Token: email:account_token' \ | |
-H 'Accept: application/json' \ | |
-H 'Content-Type: application/json' \ | |
-X PUT \ |
git clone https://github.com/username/username.github.io.git | |
git checkout source | |
Then we need to setup the deploy directory. | |
mkdir _deploy | |
cd _deploy | |
git init | |
git remote add -t master -f origin https://github.com/username/username.github.io.git | |
Done! Now we can make changes in source branch and use rake gen_deploy as usual. |
- create deploy user and add to sudoers | |
- log in as deployer | |
- install stack with: sudo wget --no-check-certificate https://raw.github.com/joshfng/railsready/master/railsready.sh && bash railsready.sh | |
- install apache2: | |
sudo apt-get update | |
sudo apt-get install apache2 | |
- fix for rvm then install passenger | |
rvm remove 2.0.0 | |
rvm autolibs install openssl | |
rvm install ruby-2.0.0-p247 --with-openssl-dir=$HOME/.rvm/usr |
# ssh stuff | |
brew install ssh-copy-id | |
ssh-copy-id root@server | |
# knife solo | |
gem install knife-solo | |
knife solo init project-name | |
knife cookbook create nginx -o cookbooks | |
knife prepare root@ip | |
# remember to add cookbook to json file eg: {"run_list":["recipe[nginx]"]} |
⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |