Skip to content

Instantly share code, notes, and snippets.

View davidpatters0n's full-sized avatar
🇬🇧
(╯°□°)╯︵ ┻━┻)

DJ Patterson davidpatters0n

🇬🇧
(╯°□°)╯︵ ┻━┻)
View GitHub Profile
stripe.com has address 54.186.23.98
stripe.com mail is handled by 10 aspmx.l.google.com.
stripe.com mail is handled by 20 alt1.aspmx.l.google.com.
stripe.com mail is handled by 20 alt2.aspmx.l.google.com.
stripe.com mail is handled by 30 aspmx2.googlemail.com.
stripe.com mail is handled by 30 aspmx3.googlemail.com.
@davidpatters0n
davidpatters0n / stripe-example.html
Created May 3, 2019 20:10
Reproduce IntegrationError
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<form action="/charge" method="post" id="payment-form">
<div class="form-row">
<label for="card-element">
Credit or debit card
klass = Stripe::PaymentIntent
intent_params = {
payment_method: payment_method_id,
amount: amount,
currency: currency,
confirmation_method: 'manual',
confirm: true,
expand: ['payment_method']
}
Loading development environment (Rails 4.2.11)
[1] pry(main)> Stripe::VERSION
=> "4.0.0"
[2] pry(main)> Stripe::PaymentIntent.confirm
NoMethodError: undefined method `confirm' for Stripe::PaymentIntent:Class
from (pry):2:in `<main>'
[3] pry(main)>
[1] pry(main)> Stripe::VERSION
=> "3.30.0"
[2] pry(main)> klass = Stripe::PaymentIntent
=> Stripe::PaymentIntent
[3] pry(main)> klass.confirm
NoMethodError: undefined method `confirm' for Stripe::PaymentIntent:Class
from (pry):3:in `<main>'
[4] pry(main)> Stripe::PaymentIntent.confirm
NoMethodError: undefined method `confirm' for Stripe::PaymentIntent:Class
from (pry):4:in `<main>'
@davidpatters0n
davidpatters0n / go-version.go
Created January 7, 2019 15:02
Go interface composition
// https://play.golang.org/p/AjNOxAM4GMt
package main
import "fmt"
type I interface {
J
i() string
}
@davidpatters0n
davidpatters0n / createStore.js
Created May 6, 2017 18:06
a really skinned version of createStore
const createStore = (reducer) => {
let state = reducer();
const listeners = [];
const store = {
getState() {
return state;
},
dispatch(action) {
state = reducer(state, action);
listeners.forEach((callback) => {
import Ember from 'ember';
const createStore = (reducer) => {
let state = reducer();
const listeners = [];
const store = {
getState() {
return state;
},
dispatch(action) {
def eval_string(klass, attrib)
s = <<EOS
class #{klass}
def #{attrib}
@#{attrib}
end
def #{attrib}=(value)
@#{attrib} = value
end
end