Skip to content

Instantly share code, notes, and snippets.

@yonggu
yonggu / apache2-unicorn-conf
Last active July 5, 2016 08:54
Apache 2 configuration file with unicorn in Rails 4
<VirtualHost *:80>
ServerName example.com
ServerAlias *.example.com
DocumentRoot /rails_app_directory/public
# Redirect all requests that don't match a file on disk under DocumentRoot get proxied to Puma
RewriteEngine On
<Proxy balancer://unicornservers>
BalancerMember http://127.0.0.1:5100
@yonggu
yonggu / gist:5720456
Created June 6, 2013 09:47
script for building rails project in Jenkins
#!/bin/bash -x
source ~/.bashrc
cd .
bundle install
read -d '' database_yml <<"EOF"
test:
adapter: postgresql
encoding: utf8
@yonggu
yonggu / .vimrc
Created June 6, 2013 08:14
.vimrc
let g:rubycomplete_rails = 1
" The NERD Tree
nmap <silent> <c-n> :NERDTreeToggle<CR>
" FuzzyFinder
nmap <silent> ff :FufFile<CR>
nmap <silent> fb :FufBuffer<CR>
nmap <silent> fd :FufDir<CR>
nmap <silent> bh :bprevious<CR>
nmap <silent> bl :bnext<CR>