Skip to content

Instantly share code, notes, and snippets.

View cmj's full-sized avatar
💭
📠

cmj cmj

💭
📠
View GitHub Profile
@cmj
cmj / wx-precip.sh
Last active December 9, 2025 15:02
Latest 24 hour precip for station
#!/bin/bash
# grab total -24hour precip for a station
# ex: start=202512081428 end=202512091428
# ./wx-precip.sh KPDX
# Total precip at KPDX (24Hr): 2.271 inches
# Total precip at KSEA (24Hr): 1.163 inches
if [ -z "$1" ]; then
station=KSEA # KSEA KPDX C5053
@cmj
cmj / verify_credentials.sh
Created December 9, 2025 11:07
verify_credentials example
#!/bin/bash
# Test verify_credentials/isLoggedIn endpoint
usage() { echo "$0 <auth_token>"; exit 1; }; [ -z $1 ] && usage
#. ~/.env-twitter
x_csrf_token=00000000000000000000000000000000
auth_token=$1
bearer_token="AAAAAAAAAAAAAAAAAAAAAFXzAwAAAAAAMHCxpeSDG1gLNLghVe8d74hl6k4%3DRUMF4xAQLsbeBhTSRrCiQpJtxoGWeyHrDb5te2jpGskWDFW82F"
@cmj
cmj / down
Created December 5, 2025 15:42
Pretty print downdetector.com
#!/usr/bin/python3
import requests
import cloudscraper
from bs4 import BeautifulSoup
# use cloudscraper + stealth_mode, print company with
# outages reported within last hour or day (see below)
scraper = cloudscraper.create_scraper(
interpreter='js2py',
@cmj
cmj / 2025-11-29_10-23.svg
Created November 29, 2025 18:28
nitter with functioning x-client-transaction-id
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cmj
cmj / grok_scraper-ipaddrs+UA.txt
Created November 21, 2025 14:48
grok in access.log
84.37.194.3 - - [21/Nov/2025:06:44:52 -0800] "GET /grok HTTP/1.1" 404 2991 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0 Safari/537.36"
92.71.44.72 - - [21/Nov/2025:06:44:52 -0800] "GET /grok HTTP/1.1" 404 2991 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0 Safari/537.36"
91.124.144.223 - - [21/Nov/2025:06:44:52 -0800] "GET /grok HTTP/1.1" 404 2991 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0 Safari/537.36"
185.211.99.30 - - [21/Nov/2025:06:44:52 -0800] "GET /grok HTTP/1.1" 404 2991 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0 Safari/537.36"
159.148.126.108 - - [21/Nov/2025:06:44:52 -0800] "GET /grok HTTP/1.1" 404 2990 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0 Safari/537.36"
45.138.248.3 - - [21/Nov/2025:

https://nitter.net/_/status/1991624623407161383


MISLEADING

[view note] - fun-conifer-bushlark (Shown notes: 7 · Rating impact: 143)
"Adversarial prompting" is tricking an LLM into bypassing design constraints, e.g. prompt injection or jailbreaks. The questions Grok answered were not "adversarial prompting." They were simple, straightforward questions that did not solicit pro-Elon responses.

@cmj
cmj / .xbindkeysrc-autowalk
Created November 20, 2025 17:08
bind mousebutton to 'hold down w' in walking sims
###########################
# xbindkeys configuration #
###########################
# back/forward button mouse binds
# load this config to bind 'w' (forward) to forward, back to disable in walking sim games
"xdotool keydown 'w'"
b:9
"xdotool keyup 'w'"
@cmj
cmj / cf.py
Created November 18, 2025 13:18
cloudflare detection issues 2025-11-18T11:35:00Z
import cloudscraper
# cloudflare detection issues 2025-11-18T11:35:00Z
# https://x.com/i/api/graphql/1VOOyvKkiI3FMmkeDNxM9A/UserByScreenName
# https://downdetector.com
scraper = cloudscraper.create_scraper() # returns a CloudScraper instance
print(scraper.get("https://downdetector.com").text)
@cmj
cmj / bsimg.sh
Created November 10, 2025 15:53
Create Bluesky post screenshot
#!/bin/bash
# Grab a bluesky post screenshot
# ex: https://bsky.app/profile/gamingonlinux.com/post/3m5bsgkarya23?ref_src=embed
input=$1
usage() { echo "$0 <bluesky_url>"; exit 1; }; [ -z "$input" ] && usage
handle=$(cut -d/ -f5 <<< "${input}")
post=${input##*/}
@cmj
cmj / twitter_cookie-20251101.sh
Last active November 16, 2025 14:31
Generate a cookies.json file (auth_token, x-csrf-token/ct0) for use with Nitter and other tools.