Skip to content

Instantly share code, notes, and snippets.

View rutenkolk's full-sized avatar

Kristin Rutenkolk rutenkolk

View GitHub Profile
@rutenkolk
rutenkolk / delchosts.sh
Created June 7, 2023 09:39 — forked from NoraCodes/delchosts.sh
Script to delete your chosts (Cohost posts) one page at a time
# You have to go into devtools and pull out your Cookie: header including the part that says Cookie:
# and replace YOUR COOKIE HEADER with that
# and replace YOUR PROJECT NAME in two places
for item in $(curl https://cohost.org/api/v1/project/YOUR PROJECT NAME/posts | jq ".items[] | objects | .postId"); do
curl 'https://cohost.org/api/v1/trpc/posts.delete?batch=1' \
-X POST -H 'content-type: application/json' \
-H 'Origin: https://cohost.org' \
-H 'YOUR COOKIE HEADER' \
--data-raw \{\"0\":\{\"projectHandle\":\"YOUR PROJECT NAME\",\"postId\":$item\}\}
done
@rutenkolk
rutenkolk / upgrade_zig.clj
Created September 16, 2021 22:35
upgrading zig to the latest version with Babashka
#!/usr/bin/env bb
(ns script
(:require [clojure.java.io :as io]
[clojure.string :as s]
[clojure.pprint :as pprint]
[clojure.java.shell :refer [sh with-sh-dir]]
[cheshire.core :as json]))
(defn prsh
([sh]