Skip to content

Instantly share code, notes, and snippets.

// Inspired by CPU Calculator from ImagePipe.NET, but with the secondary output stream polled rather than event-based.
#nullable enable
using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using FluentAssertions;
using Mediapipe.Net.Core;
using Mediapipe.Net.Framework;
@dbruning
dbruning / autohotkey email address script
Created August 18, 2020 00:45
For madethis.blog "Developer tools & Tricks"post
;ctrl-shift-e = email address, plus put cursor in the right place to add +something
^+e::send darren@bruning.net.nz{Left}{Left}{Left}{Left}{Left}{Left}{Left}{Left}{Left}{Left}{Left}{Left}{Left}{Left}{Left}
@dbruning
dbruning / getHopMesh.js
Created July 25, 2020 19:17
Calculation of hop mesh for thereandbackagain.nz
function getHopMesh(row, toEastingField, toNorthingField, transportMode, material, topHalf) {
let from = {
x: eastingToMap(row.data.SA2_usual_residence_easting),
y: northingToMap(row.data.SA2_usual_residence_northing)
}
let to = {
x: eastingToMap(row.data[toEastingField]),
y: northingToMap(row.data[toNorthingField])
}
@dbruning
dbruning / Test gist
Created July 25, 2020 17:53
Test for embedding gist in madethisblog
This is a test gist
It will be embedded:
* Inside a test page
* Nowhere else