Skip to content

Instantly share code, notes, and snippets.

View dudewheresmycode's full-sized avatar

Brian R dudewheresmycode

View GitHub Profile
@dudewheresmycode
dudewheresmycode / OpenGolfSim-CLA.md
Created November 25, 2026 18:52
The Contributor License Agreement document for OpenGolfSim contributors

OpenGolfSim LLC Contributor License Agreement

Thank you for your interest in contributing to software projects owned or managed by OpenGolfSim LLC, a Colorado limited liability company ("OpenGolfSim", "we", "us").

This Contributor License Agreement ("Agreement") documents the rights you grant to OpenGolfSim when you submit a Contribution. It protects you, OpenGolfSim, and users of our software. Except for the licenses granted in this Agreement, you keep all right, title, and interest in and to your Contributions.

By signing this Agreement (including electronically, for example through CLA Assistant on GitHub), you accept and agree to the following terms for all of your past, present, and future Contributions to any Project.

1. Definitions

@dudewheresmycode
dudewheresmycode / OpenGolfSim.gpl
Created November 6, 2025 05:19
OpenGolfSim color palette
GIMP Palette
Name: OpenGolfSim Surfaces v3
#
0 196 35 #00C423 #fairway
17 91 19 #115B13 #rough
41 103 213 #2967D5 #water
52 62 19 #343E13 #trees
130 221 160 #82DDA0 #fringe
142 254 180 #8EFEB4 #green
134 181 154 #86B59A #tee
# Define the P/Invoke signatures
Add-Type @"
using System;
using System.Runtime.InteropServices;
using System.Text;
public class WindowTools {
[StructLayout(LayoutKind.Sequential)]
public struct RECT {
public int Left;
@dudewheresmycode
dudewheresmycode / DeployRokuApp.sh
Created July 19, 2024 18:02
Bash script to sideload app to a Roku device in dev mode
#!/usr/bin/env bash
ROKU_IP="192.168.1.167"
ROKU_USER="rokudev"
ROKU_PASSWORD="XXXXXXX"
APP_FOLDER="app"
DEST_FOLDER="dist"
timestamp=$(date +%s)
zipfile="../$DEST_FOLDER/rokuapp-$timestamp.zip"
@dudewheresmycode
dudewheresmycode / install_node_20_rpi4.sh
Created November 13, 2023 02:53
Install NodeJS on Raspberry Pi 4 (armv8)
#!/bin/bash
wget "https://nodejs.org/dist/v20.9.0/node-v20.9.0-linux-arm64.tar.xz"
tar -xf node-v20.9.0-linux-arm64.tar.xz
cd node-v20.9.0-linux-arm64
sudo cp -R bin include lib share /usr/local/
node -v
npm -v
@dudewheresmycode
dudewheresmycode / generate_iframes_list.sh
Created March 17, 2023 18:06
Generate a list of keyframes from a media file
#!/bin/bash
ffprobe \
-v error \
-select_streams v \
-show_entries frame=pict_type,pts_time \
-of csv=p=0 \
-skip_frame nokey \
$INPUT_FILE > iframes.txt
@dudewheresmycode
dudewheresmycode / package.sh
Last active July 10, 2023 15:13
Transcode fragmented MP4s and package into HLS and DASH using shaka-packager
#!/bin/bash
packager \
'in=./tmp/output_540p.mp4,stream=video,init_segment=./tmp/output/video_3000_0/video_init.mp4,segment_template=./tmp/output/video_3000_0/video_$Number$.m4s' \
'in=./tmp/output_720p.mp4,stream=video,init_segment=./tmp/output/video_1700_1/video_init.mp4,segment_template=./tmp/output/video_1700_1/video_$Number$.m4s' \
'in=./tmp/output_1080p.mp4,stream=video,init_segment=./tmp/output/video_1200_2/video_init.mp4,segment_template=./tmp/output/video_1200_2/video_$Number$.m4s' \
'in=./tmp/output_audio_128.mp4,stream=audio,language=en,roles=main,hls_name=main_en_2,init_segment=./tmp/output/audio_96_2/audio_init.mp4,segment_template=./tmp/output/audio_96_2/audio_$Number$.m4s' \
'in=./tmp/output_audio_196.mp4,stream=audio,language=en,roles=main,hls_name=main_en_3,init_segment=./tmp/output/audio_64_3/audio_init.mp4,segment_template=./tmp/output/audio_64_3/audio_$Number$.m4s' \
--fragment_duration 6 \
--segment_duration 6 \

Generate 2min of colorbars and audio

ffmpeg \
-f lavfi -i "sine=frequency=1000:duration=120" \
-f lavfi \
-i testsrc=duration=5:size=1280x720:rate=24 \
-t 120 \
-map 0:0 \
-map 1:0 \
@dudewheresmycode
dudewheresmycode / deploy_to_roku.sh
Last active January 27, 2022 23:35
A bash script to automate deploying test apps to Roku devices on the local network.
#!/bin/bash
BUILD_ID=$(date +"%s")
SRC_DIR="MyApp"
ZIP_FILE="dist/devbuild_$BUILD_ID.zip"
ROKU_URL="http://192.168.1.167"
ROKU_DEV_USER="rokudev"
ROKU_DEV_PW="******"
@dudewheresmycode
dudewheresmycode / generate-live-stream.sh
Created February 8, 2021 02:33
Generate test colorbars and count for live streaming
#!/bin/sh
ffmpeg \
-i "http://relay.publicdomainradio.org/classical.mp3" \
-f lavfi \
-re \
-i testsrc=duration=120:size=1280x720:rate=24 \
-map 0:0 \
-map 1:0 \
-c:v libx264 \