Skip to content

Instantly share code, notes, and snippets.

@adav
adav / app.rb
Last active August 29, 2015 14:20 — forked from michaelvillar/app.rb
Stripe Sinatra
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
@adav
adav / mersenne-twister.ts
Created July 3, 2020 17:44 — forked from thiloplanz/mersenne-twister.ts
A TypeScript implementation of the Mersenne Twister pseudo-random number generator
/*
* 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.