Skip to content

Instantly share code, notes, and snippets.

@cjavilla-stripe
cjavilla-stripe / webhooks.tsx
Created March 25, 2022 13:11
Handle Stripe webhooks in Remix
import Stripe from 'stripe'
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY)
export const action = async ({request}) => {
const secret = 'whsec_...' // process.env.WEBHOOK_SIGNING_SECRET
const sig = request.headers.get('stripe-signature')
let event;
const payload = await request.text()
@molotovbliss
molotovbliss / Mb-M2-resources.md
Created March 19, 2018 17:29
Magento2 Resources List; Needing a place to keep a list of all the tools/references used during Magento development.
@strzlee
strzlee / gamescope-session.sh
Created February 7, 2022 09:45
gamescope-session
#!/bin/sh
source /etc/gamescope-session.conf
export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
# Source environment from ~/.config/environment.d
set -a
for i in ~/.config/environment.d/*.conf ;
do
[[ -f "${i}" ]] && source "${i}"
@degitgitagitya
degitgitagitya / .env
Last active April 18, 2024 17:46
Next JS + Next Auth + Keycloak + AutoRefreshToken
# KEYCLOAK BASE URL
KEYCLOAK_BASE_URL=
# KEYCLOAK CLIENT SECRET
KEYCLOAK_CLIENT_SECRET=
# KEYCLOAK CLIENT ID
KEYCLOAK_CLIENT_ID=
# BASE URL FOR NEXT AUTH
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active April 18, 2024 17:44
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

If 2fa is enabled on github switch to ssh instead of https on linux
1. generate an ssh keypair on your linux box
ssh-keygen -t {rsa|dsa}
2. add the public key to github: profile - settings - ssh keys
3. switch from https to ssh
Check your repo remote:
@0atman
0atman / configuration.nix
Last active April 18, 2024 17:42
A rebuild script that commits on a successful build
{
config,
pkgs,
options,
...
}: let
hostname = "oatman-pc"; # to alllow per-machine config
in {
networking.hostName = hostname;
@bshall
bshall / evaluate_pitch_accuracy.py
Created June 29, 2020 10:10
Evaluate raw pitch accuracy of a few pitch tracking methods on MDB-stem-synth
import numpy as np
import matplotlib.pyplot as plt
from pathlib import Path
import itertools
import pandas as pd
from concurrent.futures import ProcessPoolExecutor
from functools import partial
import librosa
@vorozhba
vorozhba / Как удалить commit в Github.txt
Last active April 18, 2024 17:41
Как удалить commit в Github
1. Получаем хэш-код коммита, к которому хотим вернуться.
2. Заходим в папку репозитория и пишем в консоль:
$ git reset --hard a3775a5485af0af20375cedf46112db5f813322a
$ git push --force
@x
x / game_images.py
Created December 23, 2023 01:29
Extract game images from OpenEmu with rom-based names
#! python
import argparse
import sqlite3
import os
import shutil
import sys
from urllib.parse import unquote
QUERY = """
SELECT ZGAME.ZNAME, ZIMAGE.ZRELATIVEPATH, ZIMAGE.ZSOURCE, ZROM.ZLOCATION