⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var AppRouter = Backbone.Router.extend({ | |
routes: { | |
"appointments/:id": "show" | |
}, | |
show: function(id){ | |
console.log("heyo we're in show with id %d", id); | |
} | |
}); |
To open files and folders from your command-line you need to add Sublime Text 2 to your path.
sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/bin/subl
And then...
subl ~/mysitedir
the problem:
subl somefile
zsh: correct 'subl' to 'ul' [nyae]? n
node -v
zsh: correct 'node' to 'od' [nyae]? n
v0.8.16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat << EOF > ~/.gemrc | |
install: --no-rdoc --no-ri | |
update: --no-rdoc --no-ri | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "NGINX http daemon" | |
start on runlevel [2345] | |
stop on runlevel [016] | |
env DAEMON=/usr/sbin/nginx | |
env PID=/var/run/nginx.pid | |
pre-start script | |
mkdir -p /var/log/nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www-data www-data; | |
worker_processes 1; # 1 per core | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
use epoll; | |
} | |
http { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream myappname { | |
server unix:/var/run/myappname/web.sock fail_timeout=0; | |
} | |
server { | |
server_name .oldappname.com; | |
rewrite ^ http://myappname.com$request_uri? permanent; | |
} | |
server { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "Myapp web application" | |
start on starting myapp | |
stop on stopping myapp | |
respawn | |
exec su - myapp -c 'cd /var/www/myapp/current/ && bundle exec unicorn -c ./config/unicorn.rb --env production >> /var/log/myapp/web.log 2>&1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "Content-Encoding":"UTF-8", | |
"Content-Length":77289, | |
"Content-Type":"application/xhtml+xml", | |
"HandheldFriendly":"True", | |
"MobileOptimized":320, | |
"X-UA-Compatible":"IE\u003dEdge", | |
"apple-mobile-web-app-title":"TechCrunch", | |
"application-name":"TechCrunch", | |
"article:publisher":"https://www.facebook.com/techcrunch", | |
"cleartype":"on", |
OlderNewer