Skip to content

Instantly share code, notes, and snippets.

View SimonHoiberg's full-sized avatar

Simon Høiberg SimonHoiberg

View GitHub Profile
## 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
# Title of Your Project [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Check%20out%20this%20cool%20project&url=https://github.com/Cool/Project&hashtags=project,opensource)
![Github License](https://img.shields.io/badge/license-MIT-green)
![Code Coverage](https://img.shields.io/badge/coverage-90%25-green)
![React Version](https://img.shields.io/badge/react-v16.12.0-blue.svg)
![example](https://mdn.mozillademos.org/files/10529/inspector.png)
#### Description of your project
#!/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;
const handleUpdatePaymentMethod = async () => {
if (!stripe || !elements) {
return;
}
try {
const { error, paymentMethod } = await stripe.createPaymentMethod({
type: 'card',
card: elements.getElement(CardNumberElement) as any,
billing_details: {
const UpdateForm = () => {
// Include these hooks:
const stripe = useStripe();
const elements = useElements();
const [nameInput, setNameInput] = useState('');
const handleUpdatePaymentMethod = async () => {
// Not implemented yet
};
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...
}
};
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 () => {
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.');
const handleSubmitPayment = async () => {
if (!stripe || !elements) {
return;
}
try {
const { error, paymentMethod } = await stripe.createPaymentMethod({
type: 'card',
card: elements.getElement(CardNumberElement) as any,
billing_details: {
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
};