Skip to content

Instantly share code, notes, and snippets.

View cmj's full-sized avatar
💭
📠

cmj cmj

💭
📠
View GitHub Profile
#!/usr/bin/env python3
import argparse
import shutil
import subprocess
from datetime import datetime
from pathlib import Path
from playwright.sync_api import sync_playwright
# loc = coordinates,zoomlevel - oCS = legend - c colorScheme (1-3?) - o = opacity - sm = smoothing
URL = "https://www.rainviewer.com/map.html?loc=45.5061,-122.6668,10&oCS=3&c=2&o=43&lm=3&layer=radar&sm=1&sn=1"
# size queryId
1 294764 gXCeOBFsTOuimuCl1qXimg/UserTweetsAndReplies
2 294493 f3-zHOaEVjLJNloOKbXC6Q/UserTweetsAndReplies
3 290538 klja8a2iJX_3to5RdfVlgw/UserTweetsAndReplies
4 290157 kkaJ0Mf34PZVarrxzLihjg/UserTweetsAndReplies
5 289412 61HQnvcGP870hiE-hCbG4A/UserTweetsAndReplies
6 289179 2NDLUdBmT_IB5uGwZ3tHRg/UserTweetsAndReplies
7 289018 EqtpEwt0CoQXmDfq5DKH0A/UserTweetsAndReplies
8 288981 aDl2OEiH_EFH10mA_ewZ9A/UserTweetsAndReplies
# size queryId
1 72405 BDo3929M41KOm8lE6VqX2g/SearchTimeline
2 71105 5jncdFP7pTElCPtR-nHx9Q/SearchTimeline
3 4467 Bcw3RzK-PatNAmbnw54hFw/SearchTimeline
4 4444 -TFXKoMnMTKdEXcCn-eahw/SearchTimeline
5 4444 R0u1RWRf748KzyGBXvOYRA/SearchTimeline
6 4444 OFvapAUD5xrCWn9xcD0A6A/SearchTimeline
7 4444 ML-n2SfAxx5S_9QMqNejbg/SearchTimeline
8 4444 M1jEez78PEfVfbQLvlWMvQ/SearchTimeline
@cmj
cmj / table.md
Created July 21, 2026 12:10
SearchTimeline queryIds
date queryId
2025-11-18 bshMIjqDk8LTXTq4w91WKw
2025-11-06 7r8ibjHuK3MWUyzkzHNMYQ
2025-10-31 4gROUrdRVzZmO2n_S-DKlA
2025-10-26 93-hE1d0zjkBu7xH19Uzag
2025-10-21 s2_tz3AV4J9EJAmAkde_SA
2025-10-15 0TyyrdQrH9390DdGyoPYfg
2025-10-11 -T6_t4Sb84voiPHPmKVwVQ
2025-09-03 -kENEUDlvUecax0ICPVi8A
@cmj
cmj / purpleair.py
Created July 21, 2026 10:18
Grab screenshot of PurpleAir's US EPA PM2.5 AQI map
#!/usr/bin/env python3
# headless playwright script that screenshots the map canvas from PurpleAir's US EPA PM2.5 AQI map
# ex: add cronjob and use with KDE media frame widget https://userbase.kde.org/Plasma/PictureFrame
# */30 * * * * /usr/local/bin/purpleair.py -q --latest --dir=~/purpleair
import argparse
import shutil
import subprocess
from datetime import datetime
from pathlib import Path
from playwright.sync_api import sync_playwright
@cmj
cmj / tw2img-html-links.svg
Created July 19, 2026 11:46
Full links in tw2img html view
@cmj
cmj / LindseyGrahamSC.csv
Last active July 12, 2026 16:30
Senator Lindsey Graham - entire Twitter archive (14,687)
We can't make this file beautiful and searchable because it's too large.
Id,Date,Text,Replies,ReTweets,Likes,Views,Source,Birdwatch,ConversationId,Url
155035044237426688,Thu Jan 05 21:16:49 UTC 2012,I'm excited about a new way to share my thoughts on political matters. Stay tuned. #scpol #sctweets #scgop #gop,0,8,9,,,,155035044237426688,https://x.com/LindseyGrahamSC/status/155035044237426688
155041595471835136,Thu Jan 05 21:42:51 UTC 2012,#IACaucus was 1st step on road to taking back #WH. We're proud to welcome candidates to SC where we pick presidents! #scgop #sctweets #scpol,1,4,0,,,,155041595471835136,https://x.com/LindseyGrahamSC/status/155041595471835136
155303410613223424,Fri Jan 06 15:03:13 UTC 2012,@thetemple @lbstewart This account offers political/campaign thoughts. @GrahamBlog remains Senate/legislative source. Please follow both!,1,1,0,,,,155303410613223424,https://x.com/LindseyGrahamSC/status/155303410613223424
@cmj
cmj / high_temps.py
Last active July 4, 2026 13:04
Grab the current hottest temps from popular north american cities
#!/usr/bin/env python3
# Grab the current hottest temps from somewhat popular (461) north american cities
import cloudscraper
from bs4 import BeautifulSoup
url = "https://www.timeanddate.com/weather/?continent=namerica&sort=6"
headers = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:154.0) Gecko/20100101 Firefox/154.0",
"Referer": "https://www.timeanddate.com/weather/",
}
@cmj
cmj / trump-rss.py
Created July 2, 2026 15:33
Trump's truthsocial.com RSS feed generator
#!/usr/bin/env python3
"""
RSS feed generator for @realDonaldTrump's Truth Social posts.
"""
import sys
import io
import re
import html
from datetime import datetime
@cmj
cmj / twitter-cookie.sh
Created June 11, 2026 14:09
Changes to login flow have been made upstream, current testing