Skip to content

Instantly share code, notes, and snippets.

View cmj's full-sized avatar
💭
📠

cmj cmj

💭
📠
View GitHub Profile
@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.
#!/bin/bash
# see https://github.com/lwthiker/curl-impersonate?tab=readme-ov-file#supported-browsers
curl_bin="curl_ff117" # curl, curl_ff117 (works), curl-impersonate-ff (doesn't work), etc
debug=1 # [0|1]
# create tempfile for cookie jar
#cookie="${temp/%//cookies.txt}"
cookie="cookies.txt"
@cmj
cmj / keys.md
Created October 25, 2025 02:02

Twitter for Android

curl -su "3nVuSoBZnx6U4vzUxf5w:Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys" -d "grant_type=client_credentials" "https://api.twitter.com/oauth2/token"
{
  "token_type": "bearer",
  "access_token": "AAAAAAAAAAAAAAAAAAAAAFXzAwAAAAAAMHCxpeSDG1gLNLghVe8d74hl6k4%3DRUMF4xAQLsbeBhTSRrCiQpJtxoGWeyHrDb5te2jpGskWDFW82F"
}