This file contains hidden or 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 'sinatra' | |
require 'stripe' | |
set :publishable_key, ENV['PUBLISHABLE_KEY'] | |
set :secret_key, ENV['SECRET_KEY'] | |
Stripe.api_key = settings.secret_key | |
get '/' do | |
erb :index |
This file contains hidden or 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
/* | |
* TypeScript port by Thilo Planz | |
* | |
* https://gist.github.com/thiloplanz/6abf04f957197e9e3912 | |
*/ | |
/* | |
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace | |
so it's better encapsulated. Now you can have multiple random number generators | |
and they won't stomp all over eachother's state. |