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]
To start, create some plans.
def show(x, y) | |
puts "#{y} #{y.to_f / x.to_f}" | |
end | |
a, b = ARGV.map(&:to_i) | |
c = a + b | |
puts a | |
show a, b | |
show b, c | |
50.times do |
@echo off | |
setlocal | |
set alias=%1 | |
set host=%2 | |
set user=%3 | |
if "" == "%alias%" goto :help | |
if "" == "%host%" set host=%alias% | |
if "" == "%user%" set user=%USERNAME% | |
rem echo Host: %host% | |
rem echo User: %user% |
vendor |
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
try(&Owner{}) | |
try(&Owner{org: &Organization{"group"}}) | |
try(&Owner{user: &User{"person"}}) |
source "https://rubygems.org" | |
gem "mochilo", :git => "https://github.com/spraints/mochilo", :ref => "custom-type-registry" | |
gem "benchmark-ips" |
Code examples use the stripe ruby gem. Most of the links are to stripe's documentation.
![stripe's object model][stripe_object_model_diagram]
To start, create some plans.
#!/bin/bash | |
root=$(cd $(dirname "$0"); pwd) | |
cd $root | |
exec ruby process.rb "$@" |
# I wanted to see how fast different constructor styles were. | |
# | |
# Calculating ------------------------------------- | |
# splat 73.970k i/100ms | |
# manual splat 77.512k i/100ms | |
# kwarg 23.687k i/100ms | |
# attr 77.930k i/100ms | |
# opts 34.173k i/100ms | |
# fetch 29.289k i/100ms | |
# ------------------------------------------------- |
.bundle |