This file contains 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
## This script works specifically with Boss GT-100 | |
## The same principle can be used for any MIDI controller. | |
aseqdump -p "GT-100" | \ | |
while IFS=" ," read src ev1 ev2 ch label1 data1 label2 data2 rest; do | |
case "$data1 $data2" in | |
"80 127" ) xdotool key Down ;; | |
"81 127" ) xdotool key Up ;; | |
esac | |
if [[ "$data1" == "7" ]]; then |
This file contains 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
# Title of Your Project [](https://twitter.com/intent/tweet?text=Check%20out%20this%20cool%20project&url=https://github.com/Cool/Project&hashtags=project,opensource) | |
 | |
 | |
 | |
 | |
#### Description of your project |
This file contains 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
#!/bin/sh | |
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
if [ 'master' = ${current_branch} ] | |
then | |
echo "ERROR: Not allowed to push to master." | |
exit 1; | |
else | |
exit 0; |
This file contains 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 handleUpdatePaymentMethod = async () => { | |
if (!stripe || !elements) { | |
return; | |
} | |
try { | |
const { error, paymentMethod } = await stripe.createPaymentMethod({ | |
type: 'card', | |
card: elements.getElement(CardNumberElement) as any, | |
billing_details: { |
This file contains 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 UpdateForm = () => { | |
// Include these hooks: | |
const stripe = useStripe(); | |
const elements = useElements(); | |
const [nameInput, setNameInput] = useState(''); | |
const handleUpdatePaymentMethod = async () => { | |
// Not implemented yet | |
}; |
This file contains 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 handleCancelSubscription = (end: boolean) => async () => { | |
try { | |
const subscription = await StripeManager.handleSubscription(user.subscriptionID, end); | |
setSubscription(subscription); | |
} catch (error) { | |
// Let the user know that something went wrong here... | |
} | |
}; |
This file contains 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 stripePromise = loadStripe(process.env.REACT_APP_STRIPE_KEY || ''); | |
const Plan = () => { | |
const [cardInformation, setCardInformation] = useState<{ | |
type: string; | |
digits: string; | |
}>(); | |
const [subscription, setSubscription] = useState<IStripeSubscription>(); | |
const fetchCardInformation = async () => { |
This file contains 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 handleRetryPayment = async () => { | |
if (!stripe || !elements) { | |
return; | |
} | |
const invoiceID = localStorage.getItem('latest_invoice_id'); | |
try { | |
if (!invoiceID) { | |
throw Error('Could not process payment. Please refresh and try again.'); |
This file contains 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 handleSubmitPayment = async () => { | |
if (!stripe || !elements) { | |
return; | |
} | |
try { | |
const { error, paymentMethod } = await stripe.createPaymentMethod({ | |
type: 'card', | |
card: elements.getElement(CardNumberElement) as any, | |
billing_details: { |
This file contains 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 CheckoutForm = () => { | |
// Include these hooks: | |
const stripe = useStripe(); | |
const elements = useElements(); | |
const [nameInput, setNameInput] = useState(''); | |
const [retry, setRetry] = useState(!!localStorage.getItem('invoice_retry')); | |
const handleSubmitPayment = async () => { | |
// Not implemented yet | |
}; |
NewerOlder