Skip to content

Instantly share code, notes, and snippets.

View thotmx's full-sized avatar

Hermes Ojeda Ruiz thotmx

  • México
View GitHub Profile
@thotmx
thotmx / staging.rb
Last active August 29, 2015 14:01
config/deploy/staging.rb
set :stage, :staging
set :rails_env, 'production'
set :deploy_to, "/home/deployerdemo/apps/#{fetch(:application)}"
role :app, %w{[email protected]}
role :web, %w{[email protected]}
role :db, %w{[email protected]}
server '162.243.105.100', user: 'deployerdemo', roles: %w{web app db}
@thotmx
thotmx / production.rb
Last active August 29, 2015 14:01
config/deploy/production.rb
set :stage, :production
role :app, %w{[email protected]}
role :web, %w{[email protected]}
role :db, %w{[email protected]}
server '162.243.71.34', user: 'deployer', roles: %w{web app db}
set :branch, ENV["REVISION"] || ENV["BRANCH_NAME"] || "master"
@thotmx
thotmx / deploy.rb
Last active August 29, 2015 14:01
config/deploy.rb
set :application, 'prueba'
set :scm, "git"
set :repo_url, "[email protected]:LogicalBricks/prueba.git"
set :deploy_to, "/home/deployer/apps/#{fetch(:application)}"
set :ssh_options, {
forward_agent: true
}
set :log_level, :debug
@thotmx
thotmx / monit_aplicacion
Last active August 10, 2019 15:23
Monit: Restart unicorn automatically
check process unicorn-<<aplicacion>>
with pidfile /home/deployer/apps/<<aplicacion>>/current/tmp/pids/unicorn.pid
start program = "/etc/init.d/unicorn_blog start"
stop program = "/etc/init.d/unicorn_blog stop"
restart program = "/etc/init.d/unicorn_blog stop && /etc/init.d/unicorn_blog start"
group unicorn-blog
check file blog-restart with path /home/deployer/apps/<<aplicacion>>/current/tmp/restart.txt
if changed timestamp
then exec "/usr/bin/monit -g unicorn-blog restart"
@thotmx
thotmx / gist:7945354
Last active December 31, 2015 06:09
Entorno para Desarrollo en Ruby en Ubuntu 13.10
Instalación del entorno de Ruby en Ubuntu 13.10
Instalación de Ruby de acuerdo a http://rvm.io:
```
\curl -sSL https://get.rvm.io | bash -s stable
```
En las preferencias de la consola de gnome, agregar que cuando se active la consola sea como login (conexión) y se abre una nueva terminal.
@thotmx
thotmx / vim_short.md
Last active January 23, 2016 21:44 — forked from apux/1_vim_short.md
mkdir -p ~/.vim/autoload ~/.vim/bundle; \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

Agregar estas líneas al archivo ~/.vimrc

execute pathogen#infect()
set nocompatible