Skip to content

Instantly share code, notes, and snippets.

Avatar

Nikola Petrovic niko-la-petrovic

View GitHub Profile
View speedtest.ps1
// CLI util at https://www.speedtest.net/apps/cli
$results = 1..10 | % { .\speedtest.exe -f json }
$results | % { $j = ConvertFrom-Json $_; @{download=$j.download.bandwidth; upload=$j.upload.bandwidth; ping=$j.ping.latency; jitter = $j.ping.jitter}} | ConvertTo-Csv
View wavheader.cs
// Spec
// https://docs.fileformat.com/audio/wav/
public static WavHeader ParseWavHeader(this Stream fs)
{
int bitDepth;
int channelCount;
int samplingRate;
int dataSectionByteCount;