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 April 15, 2025 17:00
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 June 4, 2022 13:37
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
from typing import Optional
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):

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 May 7, 2025 20:12
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
@darrenparkinson
darrenparkinson / JabberDemoBot.py
Last active March 7, 2022 01:51
Jabber BOT Demo using Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import logging
import getpass
from optparse import OptionParser
import time
import sleekxmpp