Skip to content

Instantly share code, notes, and snippets.

View anselanza's full-sized avatar
👋

Stephen Buchanan anselanza

👋
  • Amsterdam, The Netherlands
View GitHub Profile
@philhartung
philhartung / dante-aes67-relay.js
Last active September 16, 2025 08:24
Relay Dante multicast to AES67. This assumes the AES67 device is synced to the same PTP master, as no PTP timestamping is done (timestamp from Dante is copied to AES67 RTP packet)
const dgram = require('dgram');
const client = dgram.createSocket({ type: 'udp4', reuseAddr: true });
const sdp = require('./sdp');
//config
const addr = '10.10.1.100';
const danteMulticast = '239.255.220.221';
const aes67Multicast = '239.69.1.122';
const samplerate = 48000;
const channels = 2;

Scenario: "Git Backup"

You are using git as a backup tool and wish to both push and pull between two local repos, the second of which is a clone of the first.

For example, you may initialize a Markdown notes repo on your laptop's startup drive. You author, save (and version) your notes primarily in this repo, but also "backup" the content by cloning the repo to an external drive. At intervals, you pull changes from the first repo into the second (either manually, or as a cron job).

@irealva
irealva / moveMirrorWeightedDistance.js
Created July 18, 2018 22:23
Gist for Move Mirror blog post: weighted distance
// poseVector1 and poseVector2 are 52-float vectors composed of:
// Values 0-33: are x,y coordinates for 17 body parts in alphabetical order
// Values 34-51: are confidence values for each of the 17 body parts in alphabetical order
// Value 51: A sum of all the confidence values
// Again the lower the number, the closer the distance
function weightedDistanceMatching(poseVector1, poseVector2) {
let vector1PoseXY = poseVector1.slice(0, 34);
let vector1Confidences = poseVector1.slice(34, 51);
let vector1ConfidenceSum = poseVector1.slice(51, 52);
@atduskgreg
atduskgreg / kinect_to_stl.pde
Created August 17, 2011 09:36
Processing sketch to make a 3D printable STL file from the Kinect (in progress)
import processing.opengl.*;
import unlekker.util.*;
import unlekker.modelbuilder.*;
import SimpleOpenNI.*;
SimpleOpenNI kinect;
boolean scanning = false;
boolean scanned = false;
int maxZ = 2000;