This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EDGE = "EDGE" | |
TOG_RELEASE = EDGE | |
module Colored | |
extend self | |
COLORS = { 'green' => 32, 'yellow' => 33,'blue' => 34} | |
EXTRAS = {'clear' => 0, 'bold' => 1} | |
COLORS.each do |color, value| | |
define_method(color) { colorize(self, :foreground => color) } | |
define_method("on_#{color}") { colorize(self, :background => color) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title>Stage</title> | |
<meta name="language" content="en" /> | |
<meta http-equiv="content-style-type" content="text/css" /> | |
<meta http-equiv="title" content="Stage"/> | |
<meta name="title" content="Stage" /> | |
<meta name="description" content="XXXXX XXXX XXXX" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugin 'acts_as_tree', :git => "git://github.com/rails/acts_as_tree.git" | |
plugin 'fckeditor', :git => "git://github.com/molpe/fckeditor.git" | |
#plugin 'acts_as_state_machine', :svn => "http://elitists.textdriven.com/svn/plugins/acts_as_state_machine/trunk" | |
#plugin 'acts_as_taggable_on_steroids', :git => "git://github.com/jviney/acts_as_taggable_on_steroids.git" | |
#generate "acts_as_taggable_migration" | |
plugin 'tog_vault', :git => "git://github.com/cauta/tog_vault.git" | |
route "map.routes_from_plugin 'tog_vault'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugin 'thinking-sphinx', :git => "git://github.com/freelancing-god/thinking-sphinx.git" | |
gem "RedCloth", :lib => "redcloth", :source => "http://code.whytheluckystiff.net" | |
rake "gems:install" | |
#private URL | |
plugin 'tog_conversatio', :git => "[email protected]:cauta/tog_conversatio.git" | |
#public url | |
#plugin 'tog_conversatio', :git => "git://github.com/cauta/tog_conversatio.git" | |
route "map.routes_from_plugin 'tog_conversatio'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'google-geocode', :version => '~> 1.2.1', :lib => 'google_geocode' | |
rake "gems:install" | |
plugin 'ym4r_gm', :svn => "svn://rubyforge.org/var/svn/ym4r/Plugins/GM/trunk/ym4r_gm" | |
puts "++++++++++++++++++++++++++++++++++++++++++++++++++++" | |
puts "Note: ym4r_gm seems to have a problem with Rails 2.2." | |
puts "But it can be resolved easily: http://railsforum.com/viewtopic.php?id=24839" | |
puts "++++++++++++++++++++++++++++++++++++++++++++++++++++" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |