Enable @username in bash render tweets via kitty-tweet
copy this into ~/.bashrc
command_not_found_handle() {
if [[ $1 =~ ^@[^[:space:]]+$ ]]; then
kitty-tweet "$@"
return $?
fiEnable @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 |
There are a few major cities as well (Tokyo, Los Angeles, New York, etc.,) that aren't included here.
Example:
WOEID=23424775 # Canada
curl -s -H "Authorization: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA" \
"https://api.twitter.com/1.1/trends/place.json?id=$WOEID" |
jq -r '.[0] | "Trending \(.locations[0].name) - \([.trends[].name] | join(" • "))"'