Skip to content

Instantly share code, notes, and snippets.

View caburum's full-sized avatar
🎒

Calum Dingwall caburum

🎒
View GitHub Profile
@caburum
caburum / mute.js
Created January 26, 2025 04:08
mute class channels in uiuc ece discord
const updateChannelOverrideSettings = Object.values(wpRequire.c).find(x => x?.exports?.Z?.updateChannelOverrideSettings).exports.Z.updateChannelOverrideSettings;
const GuildChannelStore = Object.values(wpRequire.c).find(x => x?.exports?.ZP?.getSFWDefaultChannel).exports.ZP;
const guild = '792806018702770247';
const delay = (delayInms) => {
return new Promise(resolve => setTimeout(resolve, delayInms));
};
for (const channel of GuildChannelStore.getChannels(guild).SELECTABLE) {
@caburum
caburum / UseSlackWeb.user.js
Created October 10, 2024 02:03
Automatically redirect to Slack web client
// ==UserScript==
// @name Use Slack web
// @namespace https://github.com/caburum
// @match https://*.slack.com/ssb/redirect*
// @grant none
// @version 1.0
// @author caburum
// @icon https://slack.com/favicon.ico
// @description Automatically redirect to Slack web client, for if you don't have the desktop client
// @run-at document-end
/*
https://stackoverflow.com/a/62105239
Set the following project properties (File -> Project properties):
SheetsToWatch: comma separated list of sheets to watch for events
WebhookUrl: URL of web service to POST update to
// WebhookToken: Authorization bearer token for POST request
// SendLastValue: [optional] set if you wish last value in updated sheet to be posted
/** @OnlyCurrentDoc */
function ToggleComment() {
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
// apply the change of the selected cell to all others in the selection (making all others selected the same)
var shouldUncomment = spreadsheet.getCurrentCell().getValue().toString().startsWith('//');
var rangeList = spreadsheet.getActiveRangeList().getRanges();
for (const range of rangeList) {
import time
import threading
from pynput.mouse import Button, Controller
from pynput.keyboard import Listener, Key
click_freq = 6
eat_period = 60
eat_duration = 5
class ClickMouse(threading.Thread):
var speed = 150;
document.body.style.transition = `all ${speed}ms ease`;
function colorize() {
var bgColor = Math.floor(Math.random() * 16777215).toString(16);
bgColor = "#" + ("000000" + bgColor).slice(-6);
document.body.style.backgroundColor = bgColor;
setTimeout(colorize, speed);
}
colorize();
// ==UserScript==
// @name Realtime total points
// @namespace http://tampermonkey.net/
// @version 0.1
// @description show total points
// @author caburum
// @match https://fridaystudentportal.com/portal/*
// @icon https://fridaystudentportal.com/favicon.ico
// @grant none
// ==/UserScript==
@caburum
caburum / RobloxBadgeCounter.py
Created February 7, 2024 23:42
counts the total number of badges a roblox user has (for badge collectors)
import requests
cursor = ''
count = 0
id = str(input('Roblox user ID: '))
while cursor != None:
response = requests.get('https://badges.roblox.com/v1/users/' + id + '/badges?limit=100&cursor=' + cursor)
res = response.json()
@caburum
caburum / gamepedia_wikis.json
Created October 2, 2021 16:12
Gamepedia wikis
[{"wiki_id":"2293208","dbname":"terraria_pl_gamepedia","sitename":"wikicities","url":"http:\/\/terraria.fandom.com\/pl\/","domain":"terraria.fandom.com\/pl","title":"Terraria Wiki","founding_user_id":"0","public":"1","lang":"pl","lang_id":"238","vertical_id":"2","vertical_name":"Games","cluster":"c9","created_at":"2013-04-17 14:44:40","deleted":"0","is_test_wiki":"0","fc_community_id":null,"is_kid_wiki":"0","wiki_manager":"38401682"},{"wiki_id":"2293209","dbname":"warshipbattle3d_gamepedia_en","sitename":"wikicities","url":"http:\/\/warshipbattle3d.fandom.com\/","domain":"warshipbattle3d.fandom.com","title":"Warship Battle 3D Wiki","founding_user_id":"0","public":"1","lang":"en","lang_id":"75","vertical_id":"2","vertical_name":"Games","cluster":"c9","created_at":"2017-07-11 12:27:51","deleted":"0","is_test_wiki":"0","fc_community_id":null,"is_kid_wiki":"0","wiki_manager":"4133"},{"wiki_id":"2293210","dbname":"overload_gamepedia_en","sitename":"wikicities","url":"http:\/\/overload.fandom.com\/","domain":"overl
@caburum
caburum / watermarker.bat
Created August 15, 2021 18:50
Batch file to easily add a repeating text watermark to images using ImageMagick. Images are taken from the "input" subfolder and saved in the "output" subfolder. Text and font can be customized in the code.
@echo off
rem ImageMagick is required
rem Activates © symbol
chcp 65001
rem Config
set "text=© YOURNAME"
set "font=C:\Windows\Fonts\segoeui.ttf"