Skip to content

Instantly share code, notes, and snippets.

View eterry1388's full-sized avatar

Eric Terry eterry1388

View GitHub Profile
watch -n 2 'ps aux | grep <process-name> | grep -v grep | awk "{print \$6/1024/1024}" | xargs printf "%.2f MB\n"'
@eterry1388
eterry1388 / stripe_token_to_customer.rb
Created November 9, 2022 00:15
Associate a Stripe token to a Customer record
require "stripe"
Stripe.api_key = "sk_test_..."
token_id = "tok_..."
customer_id = "cus_..."
Stripe::Customer.create_source(
customer_id,
{ source: token_id },