Skip to content

Instantly share code, notes, and snippets.

View cmj's full-sized avatar
💭
📠

cmj cmj

💭
📠
View GitHub Profile
@cmj
cmj / example.md
Last active January 2, 2026 05:48
Nitter - 2 bearerTokens, 1 cookie

Randomized use of iPhone and Android bearer tokens for API results in increased rate-limits.
Both tokens show x-rate-limit-remaining of 147

> $ endpoints.sh $AUTH_TOKEN # Using Android bearerToken
1) -oaLodhGbbnzJBACb1kk2Q/UserByScreenName 8) q94uRCEn65LZThakYcPT6g/TweetDetail 15) BbGLL1ZfMibdFNWlk7a0Pw/ListTimeline
2) u7wQyGi6oExe8_TRWGMq4Q/UserResultByScreenNameQuery 9) 7xflPyRiUxGVbJd4uWmbfg/TweetResultByRestId 16) oRJs8SLCRNRbQzuZG93_oA/UserTweets
3) oPppcargziU1uDQHAUmH-A/UserResultByIdQuery 10) nzme9KiYhfIOrrLrPP_XeQ/TweetResultByIdQuery 17) kkaJ0Mf34PZVarrxzLihjg/UserTweetsAndReplies
4) 3JNH4e9dq1BifLxAa3UMWg/UserWithProfileTweetsQueryV2 11) gkjsKepM6gl_HmFWoWKfgg/SearchTimeline 18) Y4Erk_-0hObvLpz0Iw3bzA/ConversationTimeline
5) 8IS8MaO-2EN6GZZZb8jF0g/UserWithProfileTweetsAndRepliesQueryV2 12) iTpgCtbdxrsJfyx0cFjHqg/ListByRestId 19) wfglZEC0MRgBdxMa_1a5YQ/Retweeters
6) 36oKqyQ7E_9CmtONGjJRsA/UserMedia 13) -kmqNvm5Y-cVrfvBy6docg/ListBySlug
7) PDfFf8hGeJvUCiTyWtw4wQ/MediaTimelineV2 14) P4NpVZDqUD_7MEM84L-8nw/ListMembers
Choose endpoint ('enter' for list, ^C to quit): 1
{"data":{"use
@cmj
cmj / search.sh
Last active December 29, 2025 22:54
Twitter rate-limit search test
#!/usr/bin/env bash
# Twitter rate-limit search test
# ./search.sh <auth_token>
auth_token=$1
x_csrf_token=$(openssl rand -hex 16)
query="fish"
product="Latest" # Latest | Top
count=1 # 1-20
@cmj
cmj / port
Created December 27, 2025 08:50
Show working directory of process listening on port number
#!/bin/bash
if [[ -z $1 ]]; then echo "$0 <port> # show cwd and process listening on port"; exit 1; fi
sudo lsof -w -a -p $(lsof -iTCP:$1 -sTCP:LISTEN | awk 'NR>1 {print $2}') -d cwd 2>/dev/null
count source
5472532 Twitter for iPhone
2352210 Twitter Web App
1675572 1910537532166836224gork
520489 Twitter for Android
323033 Banners & Ads
291193 TweetDeck Web App
55102 Twitter Web Client
51085 Twitter for iPad
@cmj
cmj / e425ccc59fa7caa1e00346350f8da096a46599b1.patch
Created December 11, 2025 16:07
[PATCH] Add source to stats row
From e425ccc59fa7caa1e00346350f8da096a46599b1 Mon Sep 17 00:00:00 2001
From: cmj <129799+cmj@users.noreply.github.com>
Date: Thu, 11 Dec 2025 06:41:15 -0800
Subject: [PATCH] Add source to stats row
---
src/api.nim | 21 ++++++++++++---------
src/parser.nim | 6 +++++-
src/sass/tweet/_base.scss | 6 ++++++
src/types.nim | 1 +
@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.