Skip to content

Instantly share code, notes, and snippets.

@pstef
pstef / mastodon_threads.py
Created March 11, 2023 10:36
Generate plain text mastodon threads
#!/usr/bin/env python
# https://codeberg.org/edent/Mastodon_Tools/src/commit/b284814810db1aaa5b0dfe98afa668f8d35eb525/threads.py
from mastodon import Mastodon
from treelib import Node, Tree
from datetime import datetime, timedelta
from urllib.parse import urlparse
import argparse
from bs4 import BeautifulSoup
@pstef
pstef / example.txt
Last active December 19, 2023 18:37
FreeBSD package dependency tree
$ pkg shell
SQLite version 3.42.0 2023-05-16 12:36:15
Enter ".help" for usage hints.
sqlite> .read tree.sql
deskutils/xfce4-notifyd (1)
databases/sqlite3 (2)
devel/libedit (2)
sysutils/xfce4-power-manager (1)
x11/libXScrnSaver (1)
x11/libXtst (145)
@pstef
pstef / _etc_hosts
Last active April 26, 2025 11:43
WebDAV for RetroArch
192.168.5.1 webdav.local
BEGIN {
FS = OFS = "\t"
}
$0 == "" { next }
NF == 2 {
current_author = $1
commits[current_author]++
next
}
NF == 3 {