This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('dotenv').config() | |
const stripe = require("stripe")(process.env.STRIPE_API_SECRET_KEY); | |
async function getOrCreateCustomer(req){ | |
let customer=await stripe.customers.list({email:req.body.email}) | |
if(customer.data.length<=0){ | |
customer = await stripe.customers.create({ | |
name:req.body.name, | |
email:req.body.email, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by https://jlopp.github.io/bitcoin-core-config-generator/ | |
# This config should be placed in following path: | |
# $HOME/Library/Application Support/Bitcoin/bitcoin.conf | |
# [core] | |
# Specify a non-default location to store blockchain data. | |
blocksdir=/Users/alvinlau/Library/Application Support/Bitcoin/blocks | |
# Run in the background as a daemon and accept commands. | |
daemon=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("div").animate({ | |
left: '1%' | |
},50).animate({ | |
left: '0%' | |
},50);$("div").animate({ | |
left: '1%' | |
},50).animate({ | |
left: '0%' | |
},50);$("div").animate({ | |
left: '1%' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const request=require('request-promise'); | |
async function main(){ | |
//By making a GET request to the API, the API returns the information about the proxy. | |
//The code below also parse JSON into JavaScript object. | |
let proxyInfo=JSON.parse(await request('https://gimmeproxy.com/api/getProxy?protocol=http')); | |
console.log(proxyInfo); | |
/* Sample JSON result | |
{ | |
"supportsHttps": true, |