Skip to content

Instantly share code, notes, and snippets.

View jamtur01's full-sized avatar
💭
I may be slow to respond.

James Turnbull jamtur01

💭
I may be slow to respond.
View GitHub Profile
(defn meal-prep
"Calculate minimum hours needed to cook meals given prep times in minutes.
Each meal must be cooked for its full duration (rounded up to nearest hour).
Up to 2 meals can be cooked simultaneously.
Args:
prep-times - Collection of meal preparation times in minutes
Returns:
Minimum hours needed to cook all meals"
@jamtur01
jamtur01 / auto-buttons.js
Last active December 6, 2024 23:06
Auto-press Skip Buttons on Plex
// ==UserScript==
// @name Trigger on Skip Forward Button Click by Adjusting Video Time
// @version 1.2
// @description Adjust video time when the Skip Forward button is clicked in the Plex player, even across episodes or media changes.
// @author James Turnbull
// @match *://*/*
// @grant none
// @license MIT
// ==/UserScript==
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: Amethyst [43442]
Path: /Applications/Amethyst.app/Contents/MacOS/Amethyst
Identifier: com.amethyst.Amethyst
Version: 0.21.1 (111)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
<nut>
<filename>Nut.js</filename>
<endpoints>
<endpoint>/api/nut/diagnostics/upsstatus</endpoint>
</endpoints>
<translations>
<title>Nut UPS Server</title>
<help>Nut Server UPS status.</help>
<unconfigured>Nut not available or not configured.</unconfigured>
</translations>
{"tabs":["overview","table","matches","stats"],"allAvailableSeasons":["2023/2024","2022/2023","2021/2022","2020/2021","2019/2020","2018/2019"],"details":{"id":9907,"type":"league","name":"Liga F","selectedSeason":"2023/2024","latestSeason":"2023/2024","shortName":"Liga F","country":"ESP","faqJSONLD":null,"breadcrumbJSONLD":{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://www.fotmob.com"},{"@type":"ListItem","position":2,"name":"Liga F","item":"https://www.fotmob.com/leagues/9907/overview/liga-f"}]}},"seostr":"liga-f","QAData":[],"table":[{"data":{"ccode":"ESP","leagueId":9907,"pageUrl":"/leagues/9907/overview/liga-f","leagueName":"Liga F","legend":[{"title":"Champions League","tKey":"championsleague","color":"#2AD572","indices":[0]},{"title":"Champions League qualification","tKey":"clqual","color":"#FFD908","indices":[1,2]},{"title":"Relegation","tKey":"relegation","color":"#FF4646","indices":[14,15]}],"ongoing":[{"id":
{"tabs":["overview","table","matches","stats"],"allAvailableSeasons":["2023/2024","2022/2023","2021/2022","2020/2021","2019/2020","2018/2019"],"details":{"id":9907,"type":"league","name":"Liga F","selectedSeason":"2023/2024","latestSeason":"2023/2024","shortName":"Liga F","country":"ESP","faqJSONLD":null,"breadcrumbJSONLD":{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://www.fotmob.com"},{"@type":"ListItem","position":2,"name":"Liga F","item":"https://www.fotmob.com/leagues/9907/overview/liga-f"}]}},"seostr":"liga-f","QAData":[],"table":[{"data":{"ccode":"ESP","leagueId":9907,"pageUrl":"/leagues/9907/overview/liga-f","leagueName":"Liga F","legend":[{"title":"Champions League","tKey":"championsleague","color":"#2AD572","indices":[0]},{"title":"Champions League qualification","tKey":"clqual","color":"#FFD908","indices":[1,2]},{"title":"Relegation","tKey":"relegation","color":"#FF4646","indices":[14,15]}],"ongoing":[],"tab

openpgp4fpr:A2C861F07924C92D698D5DDA6AFC66C2625EC8BB

@jamtur01
jamtur01 / convert.py
Created July 1, 2022 18:02 — forked from mturilin/convert.py
Converst TextExpander csv to espanso yaml
#!/usr/bin/python3
import yaml
import sys
import csv
# create root yaml
matches = []
# open file
local ConROC_Warrior, ids = ...;
local lastFrame = 0;
local lastDebuff = 0;
local lastRage = 0;
local lastStun = 0;
local plvl = UnitLevel('player');
local defaults = {
local ConROC_Warlock, ids = ...;
local lastFrame = 0;
local lastDemon = 0;
local lastCurse = 0;
local lastDebuff = 0;
local lastSpell = 0;
local lastOption = 0;
local plvl = UnitLevel('player');