Skip to content

Instantly share code, notes, and snippets.

View Vocaned's full-sized avatar
🐦‍⬛

Vocaned Vocaned

🐦‍⬛
View GitHub Profile
#!/bin/sh
input_id="13364:53311:Keychron_Keychron_M6"
output_id="DP-1"
if [ "$1" == "lock" ]; then
swaymsg input "$input_id" map_to_output "$output_id"
echo "Cursor locked to $output_id"
elif [ "$1" == "unlock" ]; then
swaymsg input "$input_id" map_to_output "*"
echo "Cursor unlocked"
/*:
* @plugindesc [v1.0] Regex Text Replacer
* @author voc
*
* @help
* Replace any regex with any other text
*/
(function() {
const DICTIONARY = [
[/\bfoot\b/, 'paw'],
init -1 python:
DICTIONARY = {
r'\bfoot\b': 'paw',
r'\bfeet\b': 'paws'
}
# Python 2.7 has unordered dictionaries, convert to list instead
keys = list(DICTIONARY.keys())
import re
// ==UserScript==
// @name Regex text replacer
// @version 1.0.2
// @description Replace any regex with any other text
// @match http://*/*
// @match https://*/*
// @match file://*/*
// @author voc
// @namespace https://github.com/Vocaned
// @grant none
// ==UserScript==
// @name Unexpire Github Artifacts
// @version 1.0.3
// @description Download "expired" github artifacts less than 3 months old
// @match https://github.com/*
// @author voc
// @namespace https://github.com/Vocaned
// @downloadURL https://gist.github.com/Vocaned/7dacb8bc5bb822a65a76f1dfa8ced08c/raw/unexpire-github-artifacts.user.js
// @grant none
// @run-at document-end
// ==UserScript==
// @name Reddit raw media
// @version 1.0.1
// @description Replace reddit media embeds with the raw files
// @match https://*.reddit.com/media
// @author voc
// @namespace https://github.com/Vocaned
// @downloadURL https://gist.github.com/Vocaned/1eeeba249dcaf05f917d82d7f7fa9438/raw/reddit-raw-media.user.js
// @grant none
// @run-at document-start
// ==UserScript==
// @name Youtube Experiment Overrides
// @version 1.1.0
// @description Generic experiment override userscript, configurable via script storage.
// @author voc
// @namespace https://github.com/Vocaned
// @match https://www.youtube.com/*
// @grant GM_getValue
// @grant GM_setValue
// @grant unsafeWindow
// ==UserScript==
// @name Twitter age bypass
// @version 1.0.2
// @description A simple userscript for bypassing Twitter media age verification
// @author voc
// @namespace https://github.com/Vocaned
// @downloadURL https://gist.github.com/Vocaned/6bb15f28530194f25dfff7ae8327846e/raw/twitter-age-bypass.user.js
// @match https://x.com/*
// @match https://twitter.com/*
// @grant none
#!/bin/env python3
# Lists each entry of a spotify list (playlist/album/artist), for yt-dlp, scrobbling etc.
from bs4 import BeautifulSoup
import re
import requests
import sys
import json
if len(sys.argv) < 2 or not sys.argv[1].startswith('https://open.spotify.com/'):
print(f'{sys.argv[0]} [spotify url]')
@Vocaned
Vocaned / crt.sh
Last active October 27, 2025 15:19
#!/bin/sh
# crt.sh api is very unreliable, don't rely on this in any scripts
if [ -z "$1" ]; then
echo "Usage: $0 <domain>"
exit 1
fi
data=$(curl -s "https://crt.sh/?q=$1&output=json" | jq -r '
.[] |