Skip to content

Instantly share code, notes, and snippets.

View NeutralAngel's full-sized avatar

Nathan Nontell NeutralAngel

View GitHub Profile
type Freezable = {
unfreezable: never;
};
type Frozen<T extends Freezable> = T & {
frozen: true;
};
function assertFreezable(thing: unknown): asserts thing is Freezable {
if (!thing || (thing as Freezable).unfreezable) {
@NeutralAngel
NeutralAngel / gist:9222233
Created February 26, 2014 02:20
Earning My Keep

Now I'm earning my keep.

Trying to get your sample_transaction.rb up and running I got this error:

➜  activemerchant-demo  ruby sample_transaction.rb
/home/nathan/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activemerchant-1.42.6/lib/active_merchant/billing/gateways/authorize_net.rb:288:in `success?': undefined method `exclude?' for ["310", "311"]:Array (NoMethodError)
	from /home/nathan/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activemerchant-1.42.6/lib/active_merchant/billing/gateways/authorize_net.rb:278:in `commit'
	from /home/nathan/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activemerchant-1.42.6/lib/active_merchant/billing/gateways/authorize_net.rb:117:in `purchase'
	from sample_transaction.rb:30:in `<main>'