Skip to content

Instantly share code, notes, and snippets.

View RaphaelAudet's full-sized avatar

Raphaël Audet RaphaelAudet

View GitHub Profile
@RaphaelAudet
RaphaelAudet / gist:7988631
Last active December 31, 2015 12:49
80-senttoci.conf
$LocalHostName myhost
# load module to read from local files
$ModLoad imfile
# for each local log file path, duplicate the 6 lines below and edit lines 2-4
$RuleSet sendtoci # use a non-default ruleset (keeps logs out of /var/log/)
$InputFileName /var/www/app/shared/log/production.log
$InputFileTag unicorn:
$InputFileStateFile sendtoci-unicorn
@RaphaelAudet
RaphaelAudet / resque_alert.rb
Last active December 29, 2015 00:09
resque_alert.rb
require 'date'
require 'redis'
require 'net/smtp'
require 'resque'
require 'resque/version'
class App
VERSION = '0.0.1'
def initialize
#!/usr/bin/env ruby
# == Synopsis
# This is a sample description of the application.
# Blah blah blah.
#
# == Examples
# This command does blah blah blah.
# ruby_cl_skeleton foo.txt
#
@RaphaelAudet
RaphaelAudet / base_presenter.rb
Created March 12, 2012 01:20
base_presenter.rb
class BasePresenter
def initialize(object, template)
@object = object
@template = template
end
private
def self.presents(name)
define_method(name) do