Skip to content

Instantly share code, notes, and snippets.

@joshuap
joshuap / deploy.rb
Created October 7, 2012 01:19
Honeybadger deployment notification capistrano task using local machine and curl
namespace :deploy do
desc "Notifies Honeybadger locally using curl"
task :notify_honeybadger do
require 'json'
require 'honeybadger'
begin
require './config/initializers/honeybadger'
rescue LoadError
logger.info 'Honeybadger initializer not found'
@dgutov
dgutov / gist:1274520
Created October 10, 2011 02:35
ruby-indent-line advice for closing paren
(defadvice ruby-indent-line (after unindent-closing-paren activate)
(let ((column (current-column))
indent offset)
(save-excursion
(back-to-indentation)
(let ((state (syntax-ppss)))
(setq offset (- column (current-column)))
(when (and (eq (char-after) ?\))
(not (zerop (car state))))
(goto-char (cadr state))