Skip to content

Instantly share code, notes, and snippets.

@iainbeeston
iainbeeston / application_helper.rb
Created March 6, 2012 23:43
Facebook real-time updates Rails Metal controller.
module ApplicationHelper
def signature(str, key = nil)
key ||= CONFIG['facebook']['secret'] if defined?(CONFIG)
OpenSSL::HMAC.hexdigest(OpenSSL::Digest::Digest.new('sha1'), key, str)
end
end
@iainbeeston
iainbeeston / mapit.mkd
Last active December 27, 2015 18:29 — forked from ismasan/mapit.mkd
ruby-install -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/2.0.0/p353/railsexpress/01-zero-broken-tests.patch -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/2.0.0/p353/railsexpress/02-railsexpress-gc.patch -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/2.0.0/p353/railsexpress/03-display-more-detailed-stack-trace.patch -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/2.0.0/p353/railsexpress/04-show-full-backtrace-on-stack-overflow.patch -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/2.0.0/p353/railsexpress/05-fix-missing-c-return-event.patch ruby 2.0.0-p353