Skip to content

Instantly share code, notes, and snippets.

@trvswgnr
trvswgnr / compress_video
Last active February 5, 2025 20:37
portable shell script to compress videos with ffmpeg
#!/bin/sh
print_usage() {
echo "usage: compress_video <input_file>"
echo "supported formats: mp4, webm, mkv, mov, avi, flv"
}
get_extension() {
f="${1##*/}"
case "$f" in
@mminer
mminer / CinemachineBrainTimelineBinder.cs
Created July 22, 2021 01:09
Unity component to bind the main camera's Cinemachine brain to a timeline's Cinemachine tracks.
using System.Linq;
using Cinemachine;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;
[ExecuteInEditMode]
public class CinemachineBrainTimelineBinder : MonoBehaviour
{
void Start()