Skip to content

Instantly share code, notes, and snippets.

View cmj's full-sized avatar
💭
📠

cmj cmj

💭
📠
View GitHub Profile
@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 / jf-search-irc.py
Created June 12, 2026 13:36
Focused on irc watch-mode
#!/usr/bin/env python3
"""
jf_search.py
---------------
Fetches and parses X (Twitter) search results from jf.x.com into structured JSON.
Usage:
python jf_search.py "python programming" --filter live
python jf_search.py "nasa" --filter top --pretty
python jf_search.py "gardening" --filter user -d
@cmj
cmj / twitter-cookie.sh
Created June 11, 2026 14:09
Changes to login flow have been made upstream, current testing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
From 5f6aef3a02ff2a3ea5e263691c1d010868993b4d Mon Sep 17 00:00:00 2001
From: cmj <129799+cmj@users.noreply.github.com>
Date: Mon, 11 May 2026 04:48:04 -0700
Subject: [PATCH] Fix for empty cards
---
src/parser.nim | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/parser.nim b/src/parser.nim
@cmj
cmj / guest-sorted-check.sh
Created May 3, 2026 14:36
Check if a Twitter timeline is sorted from guest views
#!/usr/bin/env bash
# Check if a timeline is sorted chronological or by "best of" as a guest
#screen_name="NWS_NTWC"
screen_name=$1
user_agent="TwitterAndroid/10.21.1"
bearer_token='AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA'
#json_file="/tmp/${endpoint##*/}-$EPOCHSECONDS.json"
guest_token=$(curl -s -XPOST -H "Authorization: Bearer ${bearer_token}" "https://api.twitter.com/1.1/guest/activate.json" | jq -r '.guest_token')
@cmj
cmj / tw2rss-guest.py
Created April 25, 2026 11:32
Standalone Twitter guest RSS generator
#!/usr/bin/env python3
# Twitter guest - standalone RSS generator
# Works with some news/govt accounts, ex:
# NASA KIRO7Seattle AJEnglish cnn abc nbcnews ap NBCNewYork ABC7NY (AOC potus whitehouse etc)
import os
import time
import json
import random
@cmj
cmj / twitter-auth_token-session.py
Last active April 2, 2026 10:56
Interactive browser session
#!/usr/bin/env python3
# Load a Twitter session using auth_token
from selenium import webdriver
from selenium.webdriver.firefox.service import Service as FirefoxService
from webdriver_manager.firefox import GeckoDriverManager
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
import sys
import os