Skip to content

Instantly share code, notes, and snippets.

@sunny0425
sunny0425 / dev.conf
Last active December 26, 2016 08:07 — forked from fnando/dev.conf
Nginx configuration for SSH tunnel
# 在服务器的nginx上添加配置
upstream tunnel {
server 127.0.0.1:3000;
}
server {
listen 80;
server_name dev.example.com;
location / {
Some brief instructions on how to use Sprocket 2 in Rails to get CoffeeScript
powered JS and SASS powered CSS with YUI compression all via the magic of rack.
This stuff will be native in Rails 3.1 and the layout of the files on the
filesystem will be different but this guide will get you working with it
while we wait for all that to finalize.
Ignore the number prefixes on each file. This is just to ensure proper order in the Gist.
It's based on eric1234 gist https://gist.github.com/911003. ijust made it 3.1 compliant in terms of convention
set :rails_env, :production
set :unicorn_binary, "/usr/bin/unicorn"
# NOTICE: 不可在此外部使用 current_path,否则将会使用固定此文件下的 deploy_to 或默认的 deploy_to
# set :unicorn_config, "#{current_path}/config/unicorn.rb"
# set :unicorn_pid, "#{current_path}/tmp/pids/unicorn.pid"
namespace :deploy do
task :start, :roles => :app, :except => { :no_release => true } do
unicorn_config = "#{current_path}/config/unicorn.rb"
unicorn_pid = "#{current_path}/tmp/pids/unicorn.pid"
@sunny0425
sunny0425 / mountain-lion-brew-setup.markdown
Created August 1, 2012 03:27 — forked from myobie/mountain-lion-brew-setup.markdown
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.