Enable @username in bash render tweets via kitty-tweet
copy this into ~/.bashrc
command_not_found_handle() {
if [[ $1 =~ ^@[^[:space:]]+$ ]]; then
kitty-tweet "$@"
return $?
fi| #!/bin/bash | |
| # dump1090-fa watchdog: run from cron every minute. | |
| # Restarts dump1090-fa if it isn't running (or its data has gone stale), | |
| # power-cycles the RTL-SDR USB device first, and sends an ntfy notification. | |
| NTFY_TOPIC="CHANGE_ME" # e.g. "my-secret-pi-adsb-topic" (uses https://ntfy.sh, free, no account) | |
| USB_VID="0bda" # Realtek RTL2832U | |
| USB_PID="2838" | |
| JSON_DIR="/run/dump1090-fa" | |
| STALE_SECS=180 # restart if aircraft.json hasn't updated in this long |
Enable @username in bash render tweets via kitty-tweet
copy this into ~/.bashrc
command_not_found_handle() {
if [[ $1 =~ ^@[^[:space:]]+$ ]]; then
kitty-tweet "$@"
return $?
fi| #!/bin/bash | |
| # KDE6 unshade hack. | |
| # Stretch stuck unshaded window to 3/4 of the current screen height, preserve width | |
| win=$(xdotool getactivewindow 2>/dev/null) || exit 0 | |
| [ -z "$win" ] && exit 0 | |
| # Bail if the "active window" is the root window | |
| root=$(xwininfo -root | awk '/Window id:/{print $4}') | |
| [ "$(printf '0x%x' "$win")" = "$root" ] && exit 0 |
| #!/usr/bin/env python3 | |
| # json dump reddit post/comment data | |
| # requires curl_cffi, reddit account cookie | |
| # ex: reddit.py "https://www.reddit.com/r/kde/comments/.json?limit=25" | |
| # reddit.py "https://www.reddit.com/r/kde/new/.json?limit=15" | |
| import sys | |
| import json | |
| from curl_cffi import requests |
| #!/usr/bin/env python3 | |
| # Print services/sites that are reporting issues via downdetector.com | |
| # - pip install curl_cffi | |
| # ex: Verizon • Spectrum • Google Fiber • Cox • OpenAI • AT&T • T-Mobile • YouTube • Wyyerd Fiber • X (Twitter) • Xfinity by Comcast • Roblox • TDS Telecom• Steam • Google | |
| import sys | |
| from bs4 import BeautifulSoup | |
| from curl_cffi import requests | |
| URL = "https://downdetector.com" |
| #!/bin/bash | |
| # sequential fuckingfast downloader for fitgirl-repacks | |
| # example: | |
| # $ fitgirl-ff-slurp https://fitgirl-repacks.site/sonic-racing-crossworlds-pc/ | |
| ff-slurp() { | |
| curl_ff117 -s "$1" | | |
| sed -En 's|.*<title>(.*)</title>|\1|p;s|.*hx-post="(.*)" hx-swap.*|https://fuckingfast.co\1|p' | | |
| xargs | | |
| while read file redir; do |
| { | |
| "data": { | |
| "tweetResult": { | |
| "result": { | |
| "__typename": "Tweet", | |
| "core": { | |
| "user_results": { | |
| "result": { | |
| "__typename": "User", | |
| "affiliates_highlighted_label": {}, |
| #!/usr/bin/env python3 | |
| """ | |
| Extract tweet id, timestamp, and text from an X/Twitter profile timeline | |
| using recent SSR as guest. Output as plaintext, json or rss. | |
| Usage: | |
| python3 extract_tweets.py elonmusk | |
| python3 extract_tweets.py cnn | |
| python3 extract_tweets.py nasa --json | |
| python3 extract_tweets.py nasa --rss > nasa.xml |