Skip to content

Instantly share code, notes, and snippets.

@spraints
spraints / gist:1648617
Created January 20, 2012 17:40
setting up a subscription with stripe

Subscriptions with stripe

Code examples use the stripe ruby gem. Most of the links are to stripe's documentation.

![stripe's object model][stripe_object_model_diagram]

Initial setup

To start, create some plans.

@wylieconlon
wylieconlon / gist:1286265
Created October 14, 2011 04:40
Canvas animation with requestAnimationFrame and mouse tracking for games
var Animator = (function() {
var container,
canvas, ctx,
w, h,
offsetLeft, offsetTop,
lastX, lastY;
var init = function(el, options) {
container = el;
@JoshCheek
JoshCheek / Gemfile
Created June 9, 2011 21:15
Sinatra + Heroku Session Bug
source "http://rubygems.org"
gem "sinatra"
@wheresalice
wheresalice / dotcloud_build.yml
Created April 4, 2011 14:34
Tech demo of Faye/NodeJS/Jade pubsub
www:
requirements:
- faye
- jade
@holman
holman / SAFE-RUBY.rb
Created February 16, 2011 05:38
This shows some of my favorite ways to ensure robust, high-security Ruby Applications.
require 'net/https'
module SecurityModule
class HighSecurity
class ReallyHighSecurity
def self.turn_on_safe_connections
OpenSSL::SSL::VERIFY_NONE
end
end
end
@ryanb
ryanb / github_tree_slider.js
Created December 6, 2010 17:23
This is how GitHub's new AJAX file browser works.
GitHub.TreeSlider = function () {
if (window.history && window.history.pushState) {
function a() {
if (e.sliding) {
e.sliding = false;
$(".frame-right").hide();
$(".frame-loading:visible").removeClass("frame-loading")
}
}
if (!($("#slider").length == 0 || !GitHub.shouldSlide)) if (!navigator.userAgent.match(/(iPod|iPhone|iPad)/)) {