Skip to content

Instantly share code, notes, and snippets.

require 'md5'
class Chargify::HooksController < ApplicationController
protect_from_forgery :except => :dispatch
before_filter :verify, :only => :dispatch
EVENTS = %w[ test signup_success signup_failure renewal_success renewal_failure payment_success payment_failure billing_date_change subscription_state_change subscription_product_change ].freeze
def dispatch
event = params[:event]
A backup from http://sites.google.com/site/redcodenl/creating-shazam-in-java-1 just in case
----
Creating Shazam in Java
A couple of days ago I encountered this article: How Shazam Works
This got me interested in how a program like Shazam works… And more importantly, how hard is it to program something similar in Java?
run "gem sources -a http://gems.github.com"
gem 'desert', :version => '0.5', :lib => 'desert'
gem 'mislav-will_paginate', :version => '~> 2.3.6', :lib => 'will_paginate', :source => 'http://gems.github.com'
gem 'tog-tog', :version => '0.4.4', :lib => 'tog'
rake "gems:install"
plugin 'acts_as_commentable', :svn => "http://juixe.com/svn/acts_as_commentable"
file "db/migrate/" + Time.now.strftime("%Y%m%d%H%M%S") + "_acts_as_commentable.rb",
%q{class ActsAsCommentable < ActiveRecord::Migration