Skip to content

Instantly share code, notes, and snippets.

View caffeinatedMike's full-sized avatar
🫠
Stuck in a perpetual state of existential crisis

Michael Hill caffeinatedMike

🫠
Stuck in a perpetual state of existential crisis
View GitHub Profile
from trello import TrelloClient
import requests
API_KEY = ""
API_SECRET = ""
TOKEN = ""
BOARD_NO = 0
LIST_NO = 10
@frenck
frenck / hassio_ubuntu_install_commands.sh
Last active February 26, 2025 21:14
Simple install command for installing Hass.io on a Generic Ubuntu/Debian machine
Unbuntu is no longer support by the Home Assistant project.
The installation commands previous listed here, are not up 2 date, not recommended, not supported and, therefore, removed.
@kcramer
kcramer / OTPTestCodes.md
Last active August 26, 2025 16:07
OTP Test Codes

OTP Test Codes

Sample OTP QR Codes

The following sample codes are not valid for the listed services but should allow basic testing of an authenticator application. Clicking on a QR code image will display just that code so it is easier to scan without interference from the other codes.

You can use this site to generate more QR codes as needed. It will also let you verify the produced codes against its own calculated code.

@skulltech
skulltech / dl.py
Created February 6, 2018 23:50
Handy Python function for downloading file with progress bar
import sys
import requests
def download(url, filename):
with open(filename, 'wb') as f:
response = requests.get(url, stream=True)
total = response.headers.get('content-length')
if total is None:
@xflr6
xflr6 / sa_sqlite3_regex.py
Last active October 4, 2025 15:53
Register a Python stdlib re handler with sqlite3 create_function() to use the SQLite REGEXP operator under SQLAlchemy
"""Use Python re for sqlite3 REGEXP operator wíth SQLAlchemy.
added in https://docs.sqlalchemy.org/en/14/changelog/migration_14.html#support-for-sql-regular-expression-operators
"""
import re
import sqlalchemy as sa
import sqlalchemy.orm
@BertrandBordage
BertrandBordage / lzw.py
Last active May 11, 2023 12:18
Lempel-Ziv-Welch algorithm in Python
from math import floor, ceil
from typing import AnyStr
ASCII_TO_INT: dict = {i.to_bytes(1, 'big'): i for i in range(256)}
INT_TO_ASCII: dict = {i: b for b, i in ASCII_TO_INT.items()}
def compress(data: AnyStr) -> bytes:
if isinstance(data, str):
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active November 28, 2025 03:29 — 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 your 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.

@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active November 26, 2025 07:55
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@azagniotov
azagniotov / download.all.adp.paystubs.js
Last active October 4, 2025 14:05
Downloads all pay-slips from ADP website
/*
This has been tested in Chrome v55.0.2883.95 (64-bit)
1. Log into ADP website using the URL: https://my.adp.com/static/redbox/login.html (Make sure you are NOT in Incognito mode)
2. Open Developer Tools console
3. Run the following code in the console:
*/
var xhr = new XMLHttpRequest();
xhr.open('GET', 'https://my.adp.com/v1_0/O/A/payStatements?adjustments=yes&numberoflastpaydates=300');