Skip to content

Instantly share code, notes, and snippets.

@markoa
markoa / deploy.rb
Created October 10, 2011 13:31
Ingredients to monitor Resque with God automatically via Capistrano (on Ubuntu)
namespace :deploy do
desc "Hot-reload God configuration for the Resque worker"
task :reload_god_config do
sudo "god stop resque"
sudo "god load #{File.join(deploy_to, 'current', 'config', 'resque-' + rails_env + '.god')}"
sudo "god start resque"
end
end
# append to the bottom:
@cstrahan
cstrahan / god.conf
Created June 4, 2012 22:07
Upstart script for God
description "God process monitoring"
author "Charles Strahan <[email protected]>"
# When to start and stop the service
start on runlevel [2345]
stop on runlevel [016]
# Automatically restart
respawn
@zabirauf
zabirauf / ROP.ex
Created March 26, 2015 07:48
Railway Oriented Programming macros in Elixir
defmodule ROP do
defmacro try_catch(args, func) do
quote do
(fn ->
try do
unquote(args) |> unquote(func)
rescue
e -> {:error, e}
end
@roccogalluzzo
roccogalluzzo / .rubocop.yml
Last active June 23, 2017 14:52 — forked from joeyates/.rubocop.yml
Cantiere creativo Rubocop Configuration
require: rubocop-rspec
AllCops:
Include:
- "**/*.gemspec"
- "**/*.podspec"
- "**/*.jbuilder"
- "**/*.rake"
- "**/*.opal"
- "**/Gemfile"