Skip to content

Instantly share code, notes, and snippets.

View FiniteReality's full-sized avatar
🙃
Figuring out MSBuild for the thousandth time

Monica S. FiniteReality

🙃
Figuring out MSBuild for the thousandth time
View GitHub Profile
@FiniteReality
FiniteReality / input.cs
Last active November 27, 2020 15:34
TerraFX input design notes
interface IAxisInput
{
// returns values in range -infinity, +infinity
float GetValue();
ChannelReader<float> GetReader();
}
interface ITriggerInput
@FiniteReality
FiniteReality / audio.cs
Last active June 16, 2020 18:25
TerraFX audio/video "pipeline" design notes
// N.B. these are "media" because they're intended to be pattern matched
// against for both audio and video
// e.g.:
// - `if (container is MatroskaContainer matroska)`
// - `if (codec is Vp8Codec vp8)`
// - `if (container is MpegContainer mpeg)`
// - `if (codec is Mp3Codec mp3)`
// format of audio/video data
interface IMediaCodec
@FiniteReality
FiniteReality / libsodium.c
Created April 8, 2017 17:35
libopus and libsodium stubs for Discord.Net
/*
MIT License
Copyright (c) FiniteReality 2017+
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@FiniteReality
FiniteReality / keybase.md
Created December 18, 2016 12:09
keybase.md

Keybase proof

I hereby claim:

  • I am FiniteReality on github.
  • I am finitereality (https://keybase.io/finitereality) on keybase.
  • I have a public key whose fingerprint is 8248 A6DD 7AF5 0811 A733 46A3 77EF 1AC9 9AEB 376E

To claim this, I am signing this object:

@FiniteReality
FiniteReality / crypto_secretbox.lua
Created November 21, 2016 20:16
Simple libsodium crypto_secretbox_easy bindings for Lua. Meant for use with discord.
local ffi = require("ffi")
-- load libsodium so we can invoke it
local sodium = ffi.load("sodium")
-- define the headers so we can wrap them
ffi.cdef([[
int crypto_secretbox_easy(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k);