Skip to content

Instantly share code, notes, and snippets.

View wilcollins's full-sized avatar
🎼
listening to mozart

Wil Collins wilcollins

🎼
listening to mozart
View GitHub Profile
@wilcollins
wilcollins / x-undo-reposts.js
Created December 27, 2025 13:11
X Undo Reposts
(async () => {
// ============================
// X / Twitter "Undo Repost" bot (DOM clicker)
// Paste into Chrome console on your profile page (Posts tab).
// Stop anytime: window.__STOP_UNREPOST = true
// ============================
window.__STOP_UNREPOST = false;
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
/**
Go to: https://m.facebook.com/pages/launchpoint/liked_pages
Zoom out a few times to load more items at once.
Paste the following script into console (F12 -> console):
**/
(async function unlikePages() {
const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
const processedElements = new Set(); // Track processed elements by their HTML representation
while (true) {
@wilcollins
wilcollins / Remove videos from Youtube Watch Later playlist.md
Created December 21, 2024 19:48 — forked from astamicu/Remove videos from Youtube Watch Later playlist.md
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

 video.querySelector('#primary button[aria-label="Action menu"]').click();
@wilcollins
wilcollins / unfollow-all-twitter.js
Created December 14, 2024 16:28
simple script to unfollow everyone on twitter/x.com
(async () => {
// Helper function to introduce delays
const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));
// Helper function to wait for an element
const waitForElement = async (selector, timeout = 5000) => {
const startTime = Date.now();
while (Date.now() - startTime < timeout) {
const element = document.querySelector(selector);
if (element) return element;
@wilcollins
wilcollins / unjoin-all-subreddits.js
Last active December 14, 2024 16:30
unjoin all reddit communities
// navigate to: https://old.reddit.com/subreddits/mine/
(function() {
// Check if jQuery is already present
if (typeof jQuery == 'undefined') {
// Inject jQuery if it is not present
var script = document.createElement('script');
script.src = 'https://code.jquery.com/jquery-3.6.0.min.js';
document.head.appendChild(script);
}
@wilcollins
wilcollins / flag-parser.sh
Created February 4, 2018 05:21
Parses long & short flags in a single block
#!/bin/bash
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd )"
# ----- defaults -----
SOME_FLAG=false
# ----- arg parsing -----
show_help(){
@wilcollins
wilcollins / sshKeyGen.sh
Last active June 30, 2018 21:22
SSH KeyGen+Copy Bash Script (quick ssh key setup)
#!/bin/bash
#
# Creates an SSH key on a client machine, applies the appropriate file permissions,
# copies to the local ~/.ssh directory, & copies to specified server
#
# parameters:
# ..1 newKeyFileName
# ..2 user@server
#
# usage :