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
(function($) { | |
$.fn.credit_card = function(opts) { | |
this.opts = opts | |
this.change(function(){ | |
var val = $(this).val() | |
if (val[0] == "4"){ | |
$(opts.visa).addClass("highlighted"); | |
return false; | |
} |
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
# 301 rewrite! | |
require 'rack/rewrite' | |
use Rack::Rewrite do | |
r301 %r{.*}, 'http://somedomain.com$&', :if => Proc.new {|rack_env| | |
rack_env['SERVER_NAME'] != 'somedomain.com' | |
} | |
end | |
# Attribution goes to https://github.com/rack/rack-contrib/blob/master/lib/rack/contrib/try_static.rb |