Skip to content

Instantly share code, notes, and snippets.

@Spiritdude
Spiritdude / blkenvflash
Created June 18, 2024 10:21
LuckFox Pico Pro/Max SD card writer from .env.txt
#!/usr/bin/python3
# == BLKENVFLASH == written by Rene K. Mueller <[email protected]>
#
# Description:
# Writes an image (.img) or to the SD card direct from existing .env.txt for LuckFox Pico Pro/Max
#
# % ./blkenvflash disk.img
# -- inquery with `lsblk` which device is your SD card resides --
# % sudo dd if=disk.img of=/dev/sdX bs=1M; sync
@matiaslopezd
matiaslopezd / webhook.header.txt
Last active June 12, 2024 15:53
Woocommerce webhook payload and header example
expect 100-continue
content-length 1998
connection close
x-wc-webhook-delivery-id 36e520ebabc2fa725092ff4a47acedf2
x-wc-webhook-id 3
x-wc-webhook-signature 5poyFy4qB6fdvvT5pGbefZmfkpL48uD47F0WYwfmpo4=
x-wc-webhook-event created
x-wc-webhook-resource order
x-wc-webhook-topic order.created
x-wc-webhook-source https://www.website.com/
@justinmoon
justinmoon / gist:8128e66fc11d90ae5732f2491570bfc5
Last active February 8, 2024 04:45
Recovering from a lost BTCPay password w/o SMTP set up

You setup a btcpay server account, forgot to setup SMTP (or set it up wrong) and then forgot your password. Now you can't get back in. Here's how I recovered from this situation:

  1. Create a new user according to these instructions. But this isn't enough because (1) Your new user isn't a member of any stores and (2) for me at least this new user couldn't setup SMTP ...

  2. There is a postgres table called UserStore which tracks membership of users in stores. When you execute the following command in postgres

select * from "UserStore";
@stewartadam
stewartadam / main.py
Last active September 9, 2024 12:41 — forked from gear11/main.py
Simple Python proxy server based on Flask and Requests with support for GET and POST requests.
"""
A simple proxy server, based on original by gear11:
https://gist.github.com/gear11/8006132
Modified from original to support both GET and POST, status code passthrough, header and form data passthrough.
Usage: http://hostname:port/p/(URL to be proxied, minus protocol)
For example: http://localhost:5000/p/www.google.com
"""
import re
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active November 17, 2024 04:56 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export to tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@bradmontgomery
bradmontgomery / dummy-web-server.py
Last active November 13, 2024 16:11
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python (Updated for Python 3.7)
Usage:
./dummy-web-server.py -h
./dummy-web-server.py -l localhost -p 8000
Send a GET request: