Skip to content

Instantly share code, notes, and snippets.

@flanter21
flanter21 / Add shared and guest tools.sh
Created March 8, 2025 12:17
Automates the process at https://docs.getutm.app/guest-support/linux/ on distros based on Fedora, Alpine, Ubuntu or Arch. Should be POSIX-compliant.
#!/bin/sh
# Load functions
#. ./functions.sh
#!/bin/sh
# Check for systemd
checkSYSTEMD ( ) {
if command -v systemctl >/dev/null 2>&1; then
echo "true"
else
@flanter21
flanter21 / slideshow interpreter.py
Last active May 28, 2025 15:33
Convert mediasite slides into video
import argparse
import json
import os
from PIL import Image
def calculate_duration(self, start_frame: int, frames_later: int, timebase: int) -> int:
return round((self[start_frame + frames_later] - self[start_frame])/1000 * timebase)
def create_slideshow(images: dict[str,int], video_duration: int, image_folder: str = "slides", end_time: int = -1,
start_time: int = 0, fps: int = 60, max_interval: int = 0, frameskip: int = 0) -> str: