Skip to content

Instantly share code, notes, and snippets.

View sullrich's full-sized avatar

Scott Ullrich sullrich

View GitHub Profile
#!/bin/bash
# gitcommit - Script to summarize git changes using OpenAI and commit with a custom message leading the AI summary
# Ensure OPENAI_API_KEY is set
if [[ -z "${OPENAI_API_KEY}" ]]; then
echo "OPENAI_API_KEY is not set. Please export it before running this script."
exit 1
fi
if [ $(echo "$STATION" | grep "youtube__" | wc -l) -gt 0 ]; then
content_id=$(echo "$STATION" | awk -F '__' '{print $2}')
PROVIDER="YOUTUBE"
elif [ $(echo "$STATION" | grep "hulu__" | wc -l) -gt 0 ]; then
content_id=$(echo "$STATION" | awk -F '__' '{print $2}')
PROVIDER="HULU"
elif [ $(echo "$STATION" | grep "www" | wc -l) -gt 0 ]; then
content_id=$(echo "$STATION" | awk -F '__' '{print $2}')
PROVIDER="WWW"
elif [ $(echo "$STATION" | grep "weatherscan" | wc -l) -gt 0 ]; then
package main
import (
"fmt"
"io"
"os/exec"
"net/http"
"github.com/gin-gonic/gin"
)
@sullrich
sullrich / stopbmi110.sh
Last active June 16, 2023 20:17
Stop playing media
#!/bin/bash
rm /tmp/bmitune110.*
adb connect 10.0.250.154
adb -s 10.0.250.154 shell am force-stop com.hulu.plus
sleep 1
@sullrich
sullrich / keep_alive.sh
Last active June 16, 2023 22:41
Monitors streams and restarts if needed.
#!/bin/bash
declare -i counter=0
declare -i failcounter110=0
declare -i failcounter145=0
check110() {
if [ -f /tmp/bmitune110.lock ]; then
return
fi
@sullrich
sullrich / bmitune110.sh
Last active May 22, 2024 20:06
tmm1/androidhdmi-for-channels hulu tuner script
#!/bin/bash
#
# bmitune110.sh
# This script is used with https://github.com/tmm1/androidhdmi-for-channels/blob/main/main.go
#
touch /tmp/bmitune110.lock
echo "$1" > /tmp/bmitune110.playing