Skip to content

Instantly share code, notes, and snippets.

View haydenmc's full-sized avatar
🍍

Hayden McAfee haydenmc

🍍
View GitHub Profile
@haydenmc
haydenmc / gist:7a4b65c6e45fc8964cc823fb321eac02
Created February 14, 2024 21:32
My Ender 3 V2 Custom Start G-Code
G90 ; use absolute coordinates
M83 ; extruder relative mode
M104 S150 ; set temporary nozzle temp to prevent oozing during homing
M140 S{first_layer_bed_temperature[0]} ; set final bed temp
G4 S30 ; allow partial nozzle warmup
G28 ; home all axis
M190 S{first_layer_bed_temperature[0]} ; wait for bed temp to stabilize
; UBL Stuff
G29 L0 ; Load mesh
@haydenmc
haydenmc / update-porkbun-dns.sh
Created July 30, 2023 23:57
Porkbun DNS Record Update Script for my Synology Router
API_KEY=PORKBUNAPIKEYHERE
API_SECRET=PORKBUNAPISECRETHERE
IP4_ADDR=$(ip -4 addr show eth0 | grep -oE '([0-9]{1,3}\.){3}([0-9]{1,3})')
IP6_ADDR=$(ip -6 addr show eth0 | grep -oE '([0-9a-f]{1,4}\:){7}([0-9a-f]{1,4})')
curl --header "Content-Type: application/json" \
--request POST \
--data '{
"apikey" : "'"$API_KEY"'",
"secretapikey" : "'"$API_SECRET"'",
@haydenmc
haydenmc / Get-RandomLetters.ps1
Created February 25, 2021 22:15
PowerShell one-liner to generate a string of random letters
# https://devblogs.microsoft.com/scripting/generate-random-letters-with-powershell/
-join ((65..90) + (97..122) | Get-Random -Count 64 | % {[char]$_})
@haydenmc
haydenmc / ffmpeg-generate-opus.cmd
Created February 23, 2021 10:38
Creates a raw Opus file suitable for test streaming with the FTL protocol.
ffmpeg.exe -i INPUTFILE.mp4 -vn -c:a libopus -b:a 160K -ac 2 OUTPUTFILE.opus
@haydenmc
haydenmc / ffmpeg-generate-h264.cmd
Created February 23, 2021 10:37
Creates a raw H264 file suitable for test streaming with the FTL protocol.
ffmpeg.exe -i <INPUTFILE> -an -c:v libx264 -b:v 5000K -tune zerolatency -r 30 -profile:v baseline -vf scale=1280:720 -x264-params keyint=60:scenecut=0:bframes=0 OUTPUTFILE.h264
@haydenmc
haydenmc / Start-FtlIngestLoadTest.ps1
Created February 23, 2021 09:23
Spins up a bunch of ftl_app instances for rudimentary FTL load testing
<#
Fires up a bunch of ftl_app instances pointing at an ingest
#>
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string]
$FtlAppPath,
@haydenmc
haydenmc / 0001-WIP-Add-plugin-for-Microsoft-Mixer-s-FTL-protocol.patch
Created May 22, 2020 03:09
GStreamer Mixer FTL Plugin Patch for 1.14.5
From b08b81705e30ce81c3747f5a424461cc297a8510 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jsteffens@make.tv>
Date: Thu, 2 May 2019 16:26:51 +0200
Subject: [PATCH] WIP: Add plugin for Microsoft Mixer's FTL protocol
We have handle the failure of the FTL library initialization somewhere
else.
---
ext/ftl/gstftl.c | 81 +++++
ext/ftl/gstftlaudiosink.c | 116 +++++++