Skip to content

Instantly share code, notes, and snippets.

View FiniteUI's full-sized avatar

Richard Seddon FiniteUI

View GitHub Profile
@vbe0201
vbe0201 / music_bot_example.py
Last active December 27, 2025 22:42
A simple music bot written using discord.py rewrite and youtube_dl.
# -*- coding: utf-8 -*-
"""
Copyright (c) 2019 Valentin B.
A simple music bot written in discord.py using youtube-dl.
Though it's a simple example, music bots are complex and require much time and knowledge until they work perfectly.
Use this as an example or a base for your own bot and extend it as you want. If there are any bugs, please let me know.
@moosetraveller
moosetraveller / first-day-of-previous-month.md
Last active November 3, 2025 19:35
How to get the first day of the previous month using Python?

How to get the first day of the previous month using Python?

Using datetime

from datetime import date

d = date(2019, 1, 8)  # date.today()

month, year = (d.month-1, d.year) if d.month != 1 else (12, d.year-1)

last_month = d.replace(day=1, month=month, year=year)

A metatable in Lua defines various extraneous behaviors for a table when indexed, modified, interacted with, etc. They are Lua's core metaprogramming feature; most well known for being useful to emulate classes much like an OOP language.

Any table (and userdata) may be assigned a metatable. You can define a metatable for a table as such:

-- Our sample table
local tab = {}
-- Our metatable
local metatable = {
 -- This table is then what holds the metamethods or metafields
@mamaj
mamaj / ssh-utils.py
Last active August 25, 2025 01:00
Python: simple class to perform commands and copy files (scp) on ssh using subprocess and native ssh client (OpenSSH).
import subprocess
import os
from pathlib import Path
from typing import Union
class SshClient():
""" Perform commands and copy files on ssh using subprocess
and native ssh client (OpenSSH).
"""
@travisbrown
travisbrown / legacy-verified.csv
Last active November 11, 2025 00:02
Twitter accounts with legacy verification on 4 April 2023 (see https://twitter.com/travisbrown/status/1643229276278235136)
We can't make this file beautiful and searchable because it's too large.
Twitter ID, Screen name, Followers
12,jack,6526006
13,biz,2608289
20,ev,1679155
57,SarahM,17448
59,Tim535353,9340
76,marciadorsey,19501
224,davepell,57523
291,goldman,916937
295,joshk,149086
@kaczmar2
kaczmar2 / pihole-v6-letsencrypt-cloudflare.md
Last active May 25, 2026 03:59
Automating SSL Certificate Renewal for Pi-hole v6 (acme.sh + Cloudflare)

Pi-hole v6: Automating Let's Encrypt SSL Renewal with Cloudflare DNS

See my other guides for SSL certificates on Pi-hole v6:

Overview

Pi-hole v6 introduces changes to its web server:

  • Embedded Web Server – Pi-hole no longer relies on lighttpd.
@mary-ext
mary-ext / bluesky-osa.md
Last active July 23, 2026 07:12
Bluesky's age assurance sucks, here's how to work around it.

Bluesky's age assurance sucks, here's how to work around it.

Bluesky has implemented age verification measures in response to regional laws that restrict access, prompting users to verify their age through Epic Games' Kids Web Services before they can access adult content.

This sucks, but thankfully there are ways to work around it.

Before diving in: I encourage you to read this entire document, including the