Skip to content

Instantly share code, notes, and snippets.

@dclamage
dclamage / tiktok-larger-caption.user.js
Created August 12, 2024 03:39
Makes the caption input taller when uploading TikTok videos
// ==UserScript==
// @name Make Caption Editor Resizable
// @namespace http://tampermonkey.net/
// @version 1.5
// @description Make the caption editor resizable (updated for main document)
// @author Your Name
// @match https://www.tiktok.com/creator-center*
// @match https://www.tiktok.com/tiktokstudio*
// @grant none
// ==/UserScript==
@dclamage
dclamage / extract-tiktok-comments.user.js
Created August 12, 2024 03:39
Extract TikTok comments from current page
// ==UserScript==
// @name Extract TikTok Comments
// @namespace http://tampermonkey.net/
// @version 2024-05-29
// @description Extracts TikTok Comments
// @author Rangsk
// @match https://www.tiktok.com/@rangsk.wordle/video/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=tiktok.com
// @grant none
// ==/UserScript==
@dclamage
dclamage / extract-youtube-comments.user.js
Created August 12, 2024 03:37
Extract youtube comments from current page
// ==UserScript==
// @name Extract YouTube Comments
// @namespace http://tampermonkey.net/
// @version 2024-05-29
// @description Extract YouTube Comments
// @author Rangsk
// @match https://www.youtube.com/watch*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
@dclamage
dclamage / edl.py
Created August 12, 2024 03:36
Converts EDL to YouTube timestamps
import os
def edl_to_youtube_chapters(edl_filepath):
youtube_chapters = []
with open(edl_filepath, 'r') as edl_file:
for line in edl_file:
if line.strip() and line[0].isdigit():
time_start = line.split()[4]
hours, minutes, seconds = time_start.split(':')[0:3]
@dclamage
dclamage / vertical.py
Created August 12, 2024 03:35
Create vertical images
from PIL import Image
import glob
import os
def resize_and_center_image(input_image_path, output_image_path):
# Open the input image
img = Image.open(input_image_path)
# Calculate the new height preserving the aspect ratio
@dclamage
dclamage / folders.py
Created August 12, 2024 03:34
Create folders script
import os
import datetime
def create_folders():
# Get current date and time
now = datetime.datetime.now()
# Use current date if it's before noon, otherwise use tomorrow's date
date_to_use = now.date() if now.hour < 12 else now.date() + datetime.timedelta(days=1)
@dclamage
dclamage / sudokupad-pagemaker.user.js
Last active January 20, 2024 10:50
Allows the use of the "Page Marker" extension with SudokuPad
// ==UserScript==
// @name SudokuPad Page Marker Compatibility
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Allows the use of the Page Marker Chrome extension with SudokuPad
// @author Rangsk
// @match *://sudokupad.app/*
// @match *://beta.sudokupad.app/*
// @grant none
// ==/UserScript==
@dclamage
dclamage / redirect-ctc-to-sudokupad.user.js
Last active July 14, 2022 00:27
Redirect crackingthecryptic to sudokupad
// ==UserScript==
// @name Redirect crackingthecryptic to sudokupad
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Redirects crackingthecryptic puzzle URLs to sudokupad
// @author Rangsk
// @match *://app.crackingthecryptic.com/sudoku/*
// @match *://test.crackingthecryptic.com/sudoku/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @run-at document-start
@dclamage
dclamage / wordledaynumber.user.js
Last active August 9, 2023 09:13
Add the day number to the Wordle title.
// ==UserScript==
// @name Wordle Day Number
// @namespace http://tampermonkey.net/
// @version 0.5
// @description Add the day number to the Wordle title.
// @author Rangsk
// @match https://www.nytimes.com/games/wordle/index.html
// @icon https://www.google.com/s2/favicons?sz=64&domain=nytimes.com
// @grant none
// ==/UserScript==
@dclamage
dclamage / ImExGivens.user.js
Created October 27, 2021 02:15
Modifies the "New Grid" popup to include an entry to paste a string of givens.
// ==UserScript==
// @name Fpuzzles-ImExGivens
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Modifies the "New Grid" popup to include an entry to paste a string of givens.
// Only valid digits that can be placed in the grid (based on the size) will be placed,
// any other character will be ignored.
// Supports sizes 10+ as well, using the characters (upper and lower case) A, B, ...G to
// represent 10, 11, ...16 respectively.
// Export current givens by running the exportGivens() command in the console.