Skip to content

Instantly share code, notes, and snippets.

@bgwaltney
bgwaltney / timeZones.js
Created March 16, 2022 17:00
Array of TimeZones
const timeZones = [
'Asia/Dubai',
'America/Antigua',
'Asia/Kabul',
'America/Anguilla',
'Europe/Tirane',
'Asia/Yerevan',
'Africa/Luanda',
'Antarctica/McMurdo',
'Antarctica/Casey',
@bgwaltney
bgwaltney / HubspotEmailSubscriptionFilter.js
Last active December 4, 2019 19:51
Hides email subscriptions on the Hubspot unsubscribe page.
var whitelist = [ //List of subscription ids you want to show.
// "7613268", //Forward Coaching Events
// "7614033", //Forward Coaching Promotions
// "7613655", //Forward Coaching Custom Communication
// "7613269", //Forward Coaching One to One Communication
// "7614034", //Forward Coaching Customer Service
// "7613270" //Forward Coaching One to One
"7209878", //BKTO Events
"6952826", //Brivity Promotions
"7073704", //Brivity Customer Communications
@bgwaltney
bgwaltney / instapayments.css
Last active April 4, 2019 13:48
Modal of InstaPayments Form
.embedded-form{
overflow-x:hidden;
overflow: hidden;
}
.modal {
overflow-x:hidden;
position: fixed;
left: 0;
top: 0;
width: 100%;
<form action="https://instapaymentpages.com/chargeinstruction/xxxxxxx" method="POST"> <!--replace this with your unique URL-->
<input type="hidden" name="passed_description" value="Online entries">
<!--Whatever value you pass to pass_params will be added to the redirect url as a query param. -->
<input type="hidden" name="pass_params[test]" value="testung">
<input type="hidden" name="passed_amount_in_cents" value="100">
<input type="hidden" name="passed_redirect_url" value="https://google.com">
<script
src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="pk_test_xxxxx"
data-amount="100"
@bgwaltney
bgwaltney / TaxPassthroughGist.html
Created January 16, 2019 15:35
Tax Passthrough for Subscriptions
<form action="" method="POST">
<!--Make sure the name "tax_percent" stays the same. Make the value a number between 0 and 100-->
<input type="hidden" name="tax_percent" value="10"/>
<script
src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="pk_live_xxxxx"
data-amount="200"
data-currency="USD"
data-name="advancearly"
<!--TEST MODE SNIPPET - Notice the ?test=true and pk_test key-->
<form action="https://instapaymentpages.com/chargeinstruction/wl/5c38c0f5922eb00015716450/5c38c0f5ba93f000154883ff?test=true" method="POST">
<input type="hidden" name="passed_description" value="Online entries">
<input type="hidden" name="passed_amount_in_cents" value="100">
<input type="hidden" name="passed_redirect_url" value="https://google.com">
<script
src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="pk_test_MkCXHgvlatofpASClOk8NG6X"
data-amount="100"
data-name="Passed values example"
<!--TEST MODE SNIPPET - Notice the ?test=true and pk_test key-->
<form action="https://instapaymentpages.com/chargeinstruction/shwoman/5c372021cb2fa30015079bb1/5c372021b9dc9c00153aeffa?test=true" method="POST">
<input type="hidden" name="passed_description" value="Online entries">
<input type="hidden" name="passed_amount_in_cents" value="100">
<input type="hidden" name="passed_redirect_url" value="https://google.com">
<script
src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="pk_test_MkCXHgvlatofpASClOk8NG6X"
data-amount="100"
{
"_id": "5bc4fb25565d9e6e0c5a2ab4",
"id": 1051861686842474500,
"__v": 0,
"createdAt": "2018-10-15T20:40:05.879Z",
"created_at": "2018-10-15T15:45:43.000Z",
"created_at_milli": 1539618343000,
"has_polly": true,
"has_voice_actor": true,
"modified_tweet": "Just arrived in Florida. Also thinking about our Amazing Alabama farmers and our many friends in North and South Carolina today. We are with you! Also still thinking about Horseface! ",
import Pusher from 'pusher-js/react-native';
// Enable pusher logging - don't include this in production
Pusher.logToConsole = true;
var pusher = new Pusher('d81f408fe7b6144f2c97', { cluster: 'us2', forceTLS: true });
var channel = pusher.subscribe('tweets'); //the channel you're subscribing to
channel.bind('new-tweets', function(data) { //listen for the new-tweet event
<form action="your-server-side-code" method="POST">
<script
src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="pk_test_TYooMQauvdEDq54NiTphI7jx"
data-amount="999"
data-name="Stripe.com"
data-description="Example charge"
data-image="https://stripe.com/img/documentation/checkout/marketplace.png"
data-locale="auto"
data-zip-code="true">