Skip to content

Instantly share code, notes, and snippets.

View dunada's full-sized avatar

Eduardo Rodrigues Gomes dunada

View GitHub Profile
@dunada
dunada / gitflow-breakdown.md
Created September 2, 2016 12:25 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master

Connect to the remote repository

@dunada
dunada / Acknowledgement.txt
Last active August 29, 2015 14:25 — forked from jpayne/Acknowledgement.txt
Start multiple Resque workers with Upstart
Thanks to Jason Roelofs for his article at http://jasonroelofs.com/2012/03/12/manage-and-monitor-resque-with-upstart-and-monit/ which got me most of the way there.
@dunada
dunada / gist:dfcd7a5ee8e5db661db7
Last active August 29, 2015 14:25 — forked from gma/gist:674141
Bluepill config for resque
ENV["PATH"] = "/opt/ruby/bin:#{ENV['PATH']}"
ENV["RAILS_ENV"] = "production"
ENV["QUEUE"] = "*"
Bluepill.application("nichelator") do |app|
app.working_dir = "/var/apps/nichelator/current"
app.uid = "app"
app.gid = "app"
2.times do |i|
app.process("resque-#{i}") do |process|
@dunada
dunada / gist:b948405bd8c81ba5a51c
Last active August 29, 2015 14:25 — forked from tomerd/gist:4179337
init.d script to control resque + resque-scheduler with rvm and bundler
#!/bin/sh
#
# chkconfig: - 85 15
# Source function library.
. /etc/rc.d/init.d/functions
ROOT="app_path"
USER="user"
ENVIRONMENT="development"
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
@dunada
dunada / deploy.rake
Last active August 29, 2015 14:07 — forked from njvitto/deploy.rake
#Deploy and rollback on Heroku in staging and production
task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
namespace :deploy do
PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU'
STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU'
task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag]
task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on]
#require 'rubygems'
require 'pp'
#require 'ap' # Awesome Print
class Object
# expects [ [ symbol, *args ], ... ]
def recursive_send(*args)
args.inject(self) { |obj, m| obj.send(m.shift, *m) }
end
end