Skip to content

Instantly share code, notes, and snippets.

View warpling's full-sized avatar

Ryan McLeod warpling

View GitHub Profile
@warpling
warpling / UIColor+ContrastChecker.swift
Created September 28, 2020 12:15
Color Extensions
//
// UIColor+ContrastChecker.swift
// Stay Inside
//
// Created by Ryan McLeod on 5/6/20.
// Copyright © 2020 Grow Pixel. All rights reserved.
//
import UIKit
@warpling
warpling / BillboardSystem.swift
Last active September 18, 2023 12:57
Billboarding System/Component for RealityKit (you supply headPosition)
import RealityKit
struct BillboardSystem: System {
static let query = EntityQuery(where: .has(BillboardComponent.self))
init(scene: RealityKit.Scene) {}
func update(context: SceneUpdateContext) {
context.scene.performQuery(Self.query).forEach { entity in
@warpling
warpling / Slicer.py
Last active July 6, 2025 12:32
A python script for splitting up movies into distinct scenes
#!/usr/bin/env python3
"""
Slice a long VHS-rip MP4 into individual clips using PySceneDetect + ffmpeg.
Usage: python vhs_slice.py input.mp4 [--out out_dir] [--threshold 35]
If there are too many scenes try increasing threshold, and vice versa
To run this script you'll need to use a python environment manager to install and manage the necessary dependencies
"""
import argparse, os, subprocess, sys