Skip to content

Instantly share code, notes, and snippets.

View JayCuthrell's full-sized avatar
☁️
GOTO 10

Jay Cuthrell JayCuthrell

☁️
GOTO 10
View GitHub Profile
@JayCuthrell
JayCuthrell / linkedin-feed-cleaner.js
Last active August 2, 2026 00:18
LinkedIn Feed cleaner to unfollow everything that can be unfollowed
javascript:(async () => {
const MAX_UNFOLLOWS = 25;
const MIN_DELAY_MS = 4000;
const MAX_DELAY_MS = 8000;
const DROPDOWN_WAIT_MS = 1000;
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const getRandomDelay = () => Math.floor(Math.random() * (MAX_DELAY_MS - MIN_DELAY_MS + 1)) + MIN_DELAY_MS;
const simulateFullClick = (el) => {
@JayCuthrell
JayCuthrell / filter.js
Created July 14, 2026 14:37
Newsletter filtering for n8n
// ==========================================
// 🚀 URL EXTRACTION & ADVANCED SURGICAL FILTERING
// ==========================================
// An enhanced regex that captures clean URLs and terminates properly before hitting HTML attributes
const urlRegex = /(https?:\/\/[^\s"'>\)\(\[\]\?,;]+)/g;
const rawLinks = htmlBody.match(urlRegex) || textBody.match(urlRegex) || [];
// Immediate drop-in check to clear out duplicates
const uniqueLinks = [...new Set(rawLinks)];
@JayCuthrell
JayCuthrell / rollback_gts.sh
Created June 19, 2026 23:52
Rollback GoToSocial to the prior version
#!/usr/bin/env bash
# --- Configuration ---
INSTALL_DIR="/gotosocial"
BACKUP_DIR="$INSTALL_DIR/backups"
GTS_DB_PATH="/var/lib/gotosocial/gts.db"
# Ensure script is run as root
if [[ "$EUID" -ne 0 ]]; then
echo -e "\e[31m[ERROR]\e[0m Please run this script as root or using sudo."
@JayCuthrell
JayCuthrell / upgrade_gotosocial.sh
Last active June 19, 2026 23:50
Upgrade GoToSocial to the latest version
#!/usr/bin/env bash
# --- Configuration ---
GTS_TARGET="linux_amd64"
INSTALL_DIR="/gotosocial"
BACKUP_DIR="$INSTALL_DIR/backups"
GTS_DB_PATH="/var/lib/gotosocial/gts.db"
# Ensure script is run as root
if [[ "$EUID" -ne 0 ]]; then
<!-- via https://www.zachleat.com/web/snow-fall -->
<script defer type="module" src="https://unpkg.com/@zachleat/snow-fall@1.0.1/snow-fall.js"></script>
<script type="module" defer>
const snow = document.createElement('snow-fall');
document.body.prepend(snow)
</script>
"""
Install the Google AI Python SDK
$ pip install google-generativeai
See the getting started guide for more information:
https://ai.google.dev/gemini-api/docs/get-started/python
"""
import os
defaults -currentHost delete -globalDomain NSStatusItemSelectionPadding
defaults -currentHost delete -globalDomain NSStatusItemSpacing
defaults -currentHost write -globalDomain NSStatusItemSelectionPadding -int 5
defaults -currentHost write -globalDomain NSStatusItemSpacing -int 5
@JayCuthrell
JayCuthrell / ai-agents-companies.md
Last active May 15, 2024 00:34
A list of A.I. agent companies
@JayCuthrell
JayCuthrell / crontab.sh
Last active December 27, 2023 20:54
crontab for mastodon as of Dec 2023
SHELL=/bin/bash
05 */3 * * * RAILS_ENV=production /home/mastodon/.rbenv/shims/ruby /home/mastodon/live/bin/tootctl accounts prune
15 */3 * * * RAILS_ENV=production /home/mastodon/.rbenv/shims/ruby /home/mastodon/live/bin/tootctl statuses remove --days 1
25 */3 * * * RAILS_ENV=production /home/mastodon/.rbenv/shims/ruby /home/mastodon/live/bin/tootctl media remove --days 1
35 */3 * * * RAILS_ENV=production /home/mastodon/.rbenv/shims/ruby /home/mastodon/live/bin/tootctl media remove --remove-headers --include-follows --days 0
45 */3 * * * RAILS_ENV=production /home/mastodon/.rbenv/shims/ruby /home/mastodon/live/bin/tootctl preview_cards remove --days 1
55 */3 * * * RAILS_ENV=production /home/mastodon/.rbenv/shims/ruby /home/mastodon/live/bin/tootctl media remove-orphans
@JayCuthrell
JayCuthrell / tags.py
Created October 21, 2023 23:45
Create frontmatter tags from a blog post using rake-nltk and stopwords
import re
import sys
import rake_nltk
from rake_nltk import Metric, Rake
def get_text_from_markdown(file_path):
with open(file_path, 'r') as f:
text = f.read()
# Remove markdown tags