Skip to content

Instantly share code, notes, and snippets.

View xxswingxx's full-sized avatar
🏠
Working from home

John Wu xxswingxx

🏠
Working from home
View GitHub Profile
@xxswingxx
xxswingxx / stripe-keys-and-ids.tsv
Created August 31, 2023 11:12 — forked from fnky/stripe-keys-and-ids.tsv
Stripe keys and IDs
Prefix Description Notes
ac_ Platform Client ID Identifier for an auth code/client id.
acct_ Account ID Identifier for an Account object.
aliacc_ Alipay Account ID Identifier for an Alipay account.
ba_ Bank Account ID Identifier for a Bank Account object.
btok_ Bank Token ID Identifier for a Bank Token object.
card_ Card ID Identifier for a Card object.
cbtxn_ Customer Balance Transaction ID Identifier for a Customer Balance Transaction object.
ch_ Charge ID Identifier for a Charge object.
cn_ Credit Note ID Identifier for a Credit Note object.

Retrieve an invoice by payment processor:

HTTP Request

GET /PAYMENT_PROCESSOR/customers/CUSTOMER_ID.json

Parameters

Parameter Type Description
PAYMENT_PROCESSOR string The name of the payment processor. Can be stripe, paypal, gocardless and braintree. Required
@xxswingxx
xxswingxx / toggleHound.js
Last active October 4, 2021 10:09
A Tampermonkey / Greasemonkey userscript to hide Hound conversations in Github PRs
// ==UserScript==
// @name Toggle Hound
// @namespace ToggleHoundInGithub
// @version 0.1
// @description Toggle Hound conversations in Github PRs
// @author xxSwingxx
// @match https://github.com/*pull*
// @icon https://www.google.com/s2/favicons?domain=tampermonkey.net
// @grant none
// ==/UserScript==
@xxswingxx
xxswingxx / settings.xml
Created September 12, 2020 14:21
Desperados 2 ultrawide resolution fix
<AttributeTable>
<Attribute name="ACTOR_ANGLE_SPINE_MAX" value="70.000000" type="float" />
<Attribute name="ACTOR_ANGLE_SPINE_MIN" value="-50.000000" type="float" />
<Attribute name="ACTOR_ANGLE_Y_HEAD_MAX" value="7.000000" type="float" />
<Attribute name="ACTOR_ANGLE_Y_HEAD_MIN" value="-7.000000" type="float" />
<Attribute name="ACTOR_ANGLE_Z_HEAD_MAX" value="46.000000" type="float" />
<Attribute name="ACTOR_ANGLE_Z_HEAD_MIN" value="-46.000000" type="float" />
<Attribute name="ACTOR_DEFAULT_VELOCITY" value="700.000000" type="float" />
<Attribute name="ACTOR_DISC_RADIUS_HORSE" value="13.000000" type="float" />
<Attribute name="ACTOR_DISC_RADIUS_HUMAN" value="13.000000" type="float" />
@xxswingxx
xxswingxx / quaderno_billing.md
Last active July 2, 2020 11:12
Quaderno Legacy Billing Javascript plugin documentation

Billing

Billing is the simplest way to give your customers access to all their receipts & billing history. They can easily download past receipts and update their billing data by themselves. Improve your billing support with a single line of code.

<div style="width: 60%; margin: 0 auto;">
  <script
    src="https://billing.quaderno.io/billing.js" class="quaderno-billing-button"
    data-key="pk_live_-8TWhJcCjnZeDyceDza7"
 data-customer-id="92041d676b3cfc7fe1cb2457d319f534118ba098"
@xxswingxx
xxswingxx / monthly_chart.html
Created October 22, 2019 14:03
amchart month column chart with date parsing
<!-- Styles -->
<style>
#chartdiv {
width : 100%;
height : 500px;
}
</style>
<!-- Resources -->
@xxswingxx
xxswingxx / fix-of-redis-error.md
Created April 28, 2019 10:48 — forked from hivokas/fix-of-redis-error.md
Fix of Redis error (Can't save in background: fork: Cannot allocate memory)

Errors from Laravel logs:

MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.

ERR Error running script (call to f_1af8e79ebe56ad4d7910f2e116e2555983099baf): @user_script:8: @user_script: 8: -MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.

Errors from Redis logs (/var/log/redis/redis-server.log):

* 1 changes in 900 seconds. Saving...
@xxswingxx
xxswingxx / 01-quaderno-js-v2.md
Last active March 1, 2019 09:12
Quaderno.js v2 reference (deprecated)

Quaderno.js v2 Reference (deprecated)

Quaderno.js is a simple javascript library that allows you to process payments, calculate sales taxes (VAT, GST, etc.) on the fly, and send beautiful tax receipts to your customers.

Note: For more help, take a look at our examples.

Including Quaderno.js

Add these script tags to your page to get started with Quaderno.js.
@xxswingxx
xxswingxx / quaderno-checkout-v2.md
Last active March 1, 2019 09:06
Quaderno Checkout v2 reference (deprecated)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://billing.quaderno.io/billing.js"></script>
</head>
<body>
<a href="#" id="billing1"> Customer 1 </a>
<a href="#" id="billing2"> Customer 2 </a>