This file contains hidden or 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 production { | |
| # fail_timeout=0 means we always retry an upstream even if it failed | |
| # to return a good HTTP response (in case the Unicorn master nukes a | |
| # single worker for timing out). | |
| # for UNIX domain socket setups: | |
| server unix:/home/<app>/sockets/.production.sock fail_timeout=0; | |
| } | |
| server { | |
| listen 80 default; |
This file contains hidden or 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
| worker_processes 4 | |
| working_directory "/home/<appname>/<appname>branches/production" | |
| # we use a shorter backlog for quicker failover when busy | |
| listen "/home/<appname>/sockets/.production.sock", :backlog => 64 | |
| # feel free to point this anywhere accessible on the filesystem | |
| pid "/home/<appname>/pids/unicorn_production.pid" |
This file contains hidden or 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
| --- | |
| ploto: | |
| token: <seu-token-aqui> | |
| repository: <git url> | |
| target_directory: <path para deploy> | |
| production: | |
| checkout_on_startup: true | |
| checkouts_to_keep: 3 |
This file contains hidden or 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
| CREATE OR REPLACE FUNCTION cast_or_null(src text, INOUT dst anyelement) | |
| LANGUAGE plpgsql AS $$ | |
| BEGIN | |
| dst := CAST(src AS anyelement); | |
| EXCEPTION | |
| WHEN others THEN | |
| dst := NULL::anyelement; | |
| END; | |
| $$; |
This file contains hidden or 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
| " Vim syntax file | |
| " Language: pgsql | |
| " Maintainer: Devrim GUNDUZ <[email protected]> | |
| " Last Change: $Date: 2010/03/11 21:43:23 $ | |
| " Filenames: *.pgsql *.plpgsql | |
| " URL: http://www.gunduz.org/postgresql/pgsql.vim | |
| " Note: The definitions below are for PostgreSQL 8.4, some versions may differ. | |
| " Changelog: Thanks to Todd A. Cook for the updates | |
| " Changelog: Thanks a lot to David Fetter for the big update set, that came as of Mar 11, 2010. |
This file contains hidden or 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
| snippet it | |
| it("should ${1:do...}", function(){ | |
| }); | |
| snippet before | |
| beforeEach(function(){ | |
| }); | |
| snippet describe | |
| describe("${1:test subject}", function(){ |
This file contains hidden or 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
| set nocompatible " be iMproved | |
| filetype off " required! | |
| call plug#begin('~/.vim/plugged') | |
| " Plugs: | |
| " Utilities | |
| Plug 'tpope/vim-commentary' | |
| Plug 'tpope/vim-fugitive' | |
| Plug 'tpope/vim-surround' |
This file contains hidden or 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
| π foo bar (baz ⋈ qux) | |
| π foo bar σ corge = grault (baz ⋈ qux) | |
| π foo bar σ corge = grault AND garply = waldo (baz ⋈ qux) |
This file contains hidden or 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
| # >---------------------------[ Install Command ]-----------------------------< | |
| # rails new APP_NAME -m http://railswizard.org/168b0f6c5ccb55ec3117.rb -T -J | |
| # >---------------------------------------------------------------------------< | |
| # | |
| # _____ _ _ __ ___ _ | |
| # | __ \ (_) | \ \ / (_) | | | |
| # | |__) |__ _ _| |___\ \ /\ / / _ ______ _ _ __ __| | | |
| # | _ // _` | | / __|\ \/ \/ / | |_ / _` | '__/ _` | | |
| # | | \ \ (_| | | \__ \ \ /\ / | |/ / (_| | | | (_| | |
This file contains hidden or 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
| apt-get update | |
| apt-get install aptitude | |
| aptitude install python-software-properties | |
| apt-add-repository ppa:pitti/postgresql | |
| add-apt-repository ppa:nginx/stable | |
| aptitude update | |
| aptitude install ruby1.9.1-full build-essential postgresql-server-dev-9.1 postgresql-contrib-9.1 nginx vim-nox git-core htop atop most | |
| pg_dropcluster 9.1 main --stop | |
| echo "pt_BR.UTF-8 UTF-8" > /var/lib/locales/supported.d/pt_BR | |
| locale-gen |