Skip to content

Instantly share code, notes, and snippets.

@msanders
msanders / README.md
Last active May 19, 2026 06:38
Export cookies from a Firefox profile to cookies.txt format

Background

http://fileformats.archiveteam.org/wiki/Netscape_cookies.txt

Installation

mkdir -p ~/bin
curl --proto "=https" --tlsv1.2 "https://gist.githubusercontent.com/msanders/0715f4a1d64190011d7813e57a2e8ffe/raw/firefox_export_cookies_txt" > ~/bin/firefox_export_cookies_txt
chmod u+x ~/bin/firefox_export_cookies_txt
@msanders
msanders / README.md
Last active February 6, 2026 09:16
Userscript: YouTube usability improvements

Userscript: YouTube usability improvements

Short userscript that disables frequently mistyped shortcuts (e.g. 0-9 number keybindings) and auto-looping on shorts.

Also available on GreasyFork.

Installation

To install, open the raw link and follow the prompt on the Userscripts, Violentmonkey, or Greasemonkey extension modal. Alternatively, you can create a new JavaScript item on the extension page and copy/paste the script. On iOS, go to the same link and tap the puzzle icon in the address bar and then the “Userscripts” menu item.

@msanders
msanders / README.md
Last active August 30, 2024 17:16
Script to remove all cookies from Safari except for a list of domains

Installation

First, install CookiesTool to a location of your choice (by default the script looks for ~/bin/CookiesTool).

Then download the script below.

curl --proto "=https" --tlsv1.2 "https://gist.githubusercontent.com/msanders/365b06cbc2f9c63981f4ab88234cd330/raw/safari_clear_cookies" -o /path/to/safari_clear_cookies
chmod u+x /path/to/safari_clear_cookies
@msanders
msanders / README.md
Last active December 27, 2024 05:27
Script to update Kiwix catalog automatically using aria2c

Minimal script to update a Kiwix catalog. Supports automatically resuming partial downloads, can safely set and forget.

Installation

curl --proto "=https" --tlsv1.2 "https://gist.githubusercontent.com/msanders/903923ce83040054a09907b376b89c7d/raw/kiwix_catalog_update" -o /usr/local/bin/kiwix_catalog_update
chmod u+x /usr/local/bin/kiwix_catalog_update

Requirements