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 'cloudfiles' | |
no such file to load -- mime/types | |
sudo gem install mime-types | |
require 'cloudfiles' | |
Gem::LoadError: Could not find RubyGem archive-tar-minitar (~> 0.5) | |
sudo gem install archive-tar-minitar |
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
# encoding: utf-8 | |
module ActionView | |
module Renderable #:nodoc: | |
private | |
def compile!(render_symbol, local_assigns) | |
locals_code = local_assigns.keys.map { |key| "#{key} = local_assigns[:#{key}];" }.join | |
source = <<-end_src | |
def #{render_symbol}(local_assigns) |
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 probe() { | |
var count = 1; | |
function recurse() { | |
count++; | |
recurse(); | |
} | |
try { | |
recurse(); | |
} catch (e) { | |
} |
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
def link_to_active(*args, &block) | |
if block_given? | |
options = args.first || {} | |
html_options = args.second | |
link_to_active(capture(&block), options, html_options) | |
else | |
name = args[0] | |
options = args[1] || {} | |
html_options = args[2] | |
link_to_unless_current(name, options, html_options) do |
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
From 7f136fa9d68b9f24aa84b02fffcf5fc180e7c658 Mon Sep 17 00:00:00 2001 | |
From: Brian Collins <brian@gastownlabs.com> | |
Date: Fri, 16 Sep 2011 23:02:34 +0100 | |
Subject: [PATCH] Use glibtoolize on OS X | |
--- | |
autogen.sh | 2 +- | |
1 files changed, 1 insertions(+), 1 deletions(-) | |
diff --git a/autogen.sh b/autogen.sh |
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
.nH #gb, /* black bar */ | |
.GcwpPb-MEmzyf, /* switch to new look */ | |
.l2.ov.nH.oy8Mbf, /* % full, copyright and last activity */ | |
.T8uMgc.lKgBkb /* chat, invite */ | |
{ display: none; } |
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
<?php | |
require 'path-to-Stripe.php'; | |
if ($_POST) { | |
Stripe::setApiKey("YOUR-API-KEY"); | |
$error = ''; | |
$success = ''; | |
try { | |
if (!isset($_POST['stripeToken'])) | |
throw new Exception("The Stripe Token was not generated correctly"); |
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
<?php | |
require 'path-to-Stripe.php'; | |
if ($_POST) { | |
Stripe::setApiKey("YOUR-API-KEY"); | |
$error = ''; | |
$success = ''; | |
try { | |
if (!isset($_POST['stripeToken'])) | |
throw new Exception("The Stripe Token was not generated correctly"); |
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
irb(main):002:0> cus = Stripe::Customer.retrieve('cus_160IzWW96HzSbp'); nil | |
=> nil | |
irb(main):003:0> cus.cancel_subscription(:at_period_end => true); nil | |
=> nil | |
irb(main):004:0> cus = Stripe::Customer.retrieve('cus_160IzWW96HzSbp'); nil | |
=> nil | |
irb(main):005:0> cus.subscription | |
=> #<Stripe::StripeObject:0x3ff7eda4cb9c> JSON: { | |
"plan": {"id":"foo","interval":"month","name":"foo","amount":2000,"currency":"usd","object":"plan","livemode":false,"interval_count":1,"trial_period_days":null}, |
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
var currentType = 'unknown'; | |
$('.card-number').keyup(function() { | |
$('.card-number, .card-number:parent').removeClass(currentType); | |
currentType = $.payment.cardType($('.card-number').val()); | |
$('.card-number, .card-number:parent').addClass(currentType); | |
}); |
OlderNewer