This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const PORT = 61392; | |
const dgram = require('dgram'); | |
const client = dgram.createSocket('udp4'); | |
// Make the discovery message | |
const msg = '<client-discovery app="SAFFIRE-CONTROL" version="4" device="iOS"/>'; | |
const hex = ('000000' + msg.length.toString(16)).substr(-6); | |
const announce = 'Length=' + hex + ' ' + msg; | |
// Start the udp socket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### Twitch Recorder script ### | |
# This script checks whether a Twitch user is streaming and if so, | |
# will start recording it. | |
# | |
# Requires: curl, jq and livestreamer | |
clientId="TWITCH_CLIENT_ID" | |
recordingDir="/mnt/recordings" | |
channel=${1:-"twitchplayspokemon"} |