Skip to content

Instantly share code, notes, and snippets.

@trestletech
trestletech / server.R
Last active February 2, 2022 09:47
A Shiny app combining the use of dplyr and SQLite. The goal is to demonstrate a full-fledged, database-backed user authorization framework in Shiny.
library(shiny)
library(dplyr)
library(lubridate)
# Load libraries and functions needed to create SQLite databases.
library(RSQLite)
library(RSQLite.extfuns)
saveSQLite <- function(data, name){
path <- dplyr:::db_location(filename=paste0(name, ".sqlite"))
@woloski
woloski / payment.html
Last active October 1, 2020 15:46
Stripe Checkout + webtask
<button class="pay">Pay</button>
<script src="https://checkout.stripe.com/checkout.js">
<script>
var handler = StripeCheckout.configure({
key: window.STRIPE_PUBLICK_KEY,
image: 'https://yourlogo.png',
locale: 'auto',
token: function(token) {
$('.pay').prop("disabled", true);
@jpalala
jpalala / react_samples_list.md
Last active November 12, 2024 04:10 — forked from leecade/react_samples_list.md
React Samples List
@vktr
vktr / rule.js
Created February 10, 2018 18:54
Add Stripe Customer Id to Auth0 via custom rule
function (user, context, callback) {
user.app_metadata = user.app_metadata || {};
if ('stripe_customer_id' in user.app_metadata) {
context.idToken['https://example.com/stripe_customer_id'] = user.app_metadata.stripe_customer_id;
return callback(null, user, context);
}
var stripe = require('stripe')('sk_....');
var customer = {