Skip to content

Instantly share code, notes, and snippets.

View daveyijzermans's full-sized avatar

Davey IJzermans daveyijzermans

View GitHub Profile
@daveyijzermans
daveyijzermans / index.js
Created April 28, 2019 11:20
Discover Focusrite Control Server on the network
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
@daveyijzermans
daveyijzermans / recorder.sh
Last active January 31, 2019 21:01
Been using this script to record my favorite twitch channel using a raspberry pi, running this 24/7. Enjoy!
#!/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"}