Skip to content

Instantly share code, notes, and snippets.

View elderlabs's full-sized avatar

Dooley_labs elderlabs

View GitHub Profile
@elderlabs
elderlabs / RestoreOldLayout.plugin.js
Last active April 27, 2025 19:11
Restores the old pre-March 2025 Discord Desktop theme in BetterDiscord -- READ THE COMMENT BELOW
/**
* @name Restore Old Client Layout
* @author Your Mother
* @description Restores the pre-March 2025 Discord Desktop UI. Shamelessly stolen from @zrodevkaan in the BD chat. Thanks kaan.
* @version 1
* @source https://gist.github.com/elderlabs/cae06cd191d997016fb4175098a8dc39
*/
module.exports = class discordExperiments {
start() {
@elderlabs
elderlabs / Blocker-9000-Cloudflare-WAF-Rule.txt
Last active November 25, 2024 23:34
Cloudflare WAF Rule to rule them all
# The ever-evolving Cloudflare WAF rule, so long as I remember to keep it up to date.
# https://gist.github.com/elderlabs/2b0b39df36ecc7d9b08699255c0adc18
# Ideally, this rule will block all automated/malicious traffic.
# This works best in an environment that lacks WordPress, which is a cancer upon the internet.
# WordPress has it's place, but it's not here. This may need editing to work for you, specifically where we limit HTTP methods.
# This works by blocking a known list of bad/commercial IP spaces/ASNs, China, all IP spaces not allocated to a country,
# anything Cloudflare has designated as a bot, any browser lacking a "Mozilla/5.0" user-agent,
# any HTTP request method that is not "GET", and any request looking for a WordPress file (starts with `/wp-` and ends with `.php`),
@elderlabs
elderlabs / scdl.py
Last active January 25, 2022 09:30
A Soundcloud playlist scraper for use with Sinusbot. Makes adding bulk lists easier.
#!/usr/bin/python3 -u
"""
A Soundcloud playlist scraper for use with Sinusbot. Makes adding bulk lists easier.
Why pull from Youtube when Soundcloud has album art. It's much nicer. Perhaps better quality; probably not.
Written by: Dooley_labs <dooleylabs.com> | https://gist.github.com/elderlabs/c72df033169322fa069eb9564d7d13bb
"""
import json
import requests
import signal
@elderlabs
elderlabs / ytdl_wrapper.py
Last active February 25, 2025 09:28
A YoutubeDL wrapper, built to diagnose and tweak interactions between Sinusbot and YTDL.
#!/usr/bin/python3 -u
"""
A YoutubeDL wrapper, built to diagnose and tweak interactions between Sinusbot and YTDL.
TL;DR something to fix Soundcloud, given it's prone to breaking quite often.
To use this script, it must be accessible and executable by your Sinusbot user. I recommend r-x (500) perms.
Support is not guaranteed and there are absolutely no warranties, implied or otherwise. Modify this script at your own risk.
Written by: Dooley_labs <dooleylabs.com> | https://gist.github.com/elderlabs/51e8e25ca8e85228ffd5e2de7b9b748b
Version: 1.3.1 (2025-02-25)