Skip to content

Instantly share code, notes, and snippets.

View t5r7's full-sized avatar
✌️

Thomas R. t5r7

✌️
  • Portsmouth, Birmingham
  • 06:04 (UTC +01:00)
View GitHub Profile
@t5r7
t5r7 / uop-moodle-auto-theme.user.js
Created February 7, 2024 13:31
Moodle (UoP) - Auto Light/Dark Theme
// ==UserScript==
// @name Moodle (UoP) Auto Light/Dark Mode
// @namespace https://tomr.me
// @version 2024-02-07
// @description Set the theme depending on browser theme preference
// @author TomR.me
// @match https://moodle.port.ac.uk/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=port.ac.uk
// @grant none
// ==/UserScript==
@t5r7
t5r7 / sncf-colons-for-time.user.js
Created January 21, 2024 17:42
SNCF Connect - Replace 00h00 with 00:00
// ==UserScript==
// @name SNCF 00h00 to 00:00
// @namespace https://tomr.me
// @version 2024-01-16
// @description Replace the "h" in the times on the SNCF website with colons
// @author TomR.me
// @match https://www.sncf-connect.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=sncf-connect.com
// @grant none
// ==/UserScript==
@t5r7
t5r7 / uop-moodle-mark-all-as-done.user.js
Last active January 23, 2024 17:08
Moodle (UoP) - Mark all as done
// ==UserScript==
// @name Moodle (UoP) Mark All as Done
// @namespace https://tomr.me
// @version 2024-01-23
// @description Mark all sections on a course page as done
// @author TomR.me
// @match https://moodle.port.ac.uk/course/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=port.ac.uk
// @grant none
// ==/UserScript==
@t5r7
t5r7 / triangle.py
Created August 24, 2023 10:39
Eris Triangle
size = 10
s = size
for i in range(0,size):
spaces = " "*i
stars = "*"*s
print(f'{spaces}{stars}')
s = s - 1
@t5r7
t5r7 / twitch_nofis.js
Created December 17, 2021 01:02
bulk disable all twitch notifs
document.querySelectorAll('.advanced-notification-settings-toggle .tw-toggle__input').forEach(
e => { if(e.hasAttribute('checked')) e.click() })

Keybase proof

I hereby claim:

  • I am itsmeimtom on github.
  • I am itsmeimtom (https://keybase.io/itsmeimtom) on keybase.
  • I have a public key ASDJYtjMiIbsxeOBtDxAK2ku5kw3NL7Z0U1S9g_Zk-1vZwo

To claim this, I am signing this object:

@t5r7
t5r7 / thing.py
Last active July 21, 2021 18:04
google photos takeout add custom geotags back into photo exif
import os
import subprocess
import json
import re
from datetime import datetime
def dothings(folder):
listing = list()
# folder = f"Photos from {folder}"
# print(folder)
@t5r7
t5r7 / percent_bar.py
Last active September 6, 2020 17:04
pro percent ting bro
def roundtotens(n):
n = int(n)
# ty https://stackoverflow.com/a/26454686 xoxo
return int((n + 9) // 10 * 10)
def percent_bar(percent):
hashCount = 0
hashes = ""
dashes = ""
@t5r7
t5r7 / todoist.js
Last active October 23, 2019 04:19
Todoist Bulk-Add
function addTask(t, hseconds) {
window.setTimeout(function() {
document.querySelectorAll('ul.items .item_editor_input .public-DraftEditor-content span')[0].innerText = t;
document.querySelectorAll('ul.items .item_editor_submit')[0].click();
}, hseconds * 500);
}
let i = 0;
for (task of tasks) {
addTask(task, i);
@t5r7
t5r7 / key-morse.py
Created June 25, 2019 21:40
Keyboard Lock Light/Beeper Morse Code
import os, time
import morse_talk as mtalk
dotLen = 0.08
print('Keyboard Lock LED Morse Code')
code = raw_input('Morse Code: ')
codeSplit = list(code)