Skip to content

Instantly share code, notes, and snippets.

View aybe's full-sized avatar
🤪
Coding 24/7 !

aybe

🤪
Coding 24/7 !
View GitHub Profile
@aybe
aybe / DllExportLister.cs
Created December 24, 2022 03:37 — forked from reigningshells/DllExportLister.cs
Simple C# program to list exports of 32 and 64 bit DLLs - output mirrored from dumpbin /exports
using System;
using System.Linq;
using System.Runtime.InteropServices;
namespace DLLExportLister
{
class Program
{
// Can't use sizeof for IMAGE_SECTION_HEADER because of unmanaged type
public const int SizeOfImageSectionHeader = 40;
@aybe
aybe / Roslyn.CodeGeneration.Program.cs
Created December 2, 2022 02:10 — forked from cmendible/Roslyn.CodeGeneration.Program.cs
Create a class with dotnet core and roslyn with using statements outside the namespace
using System;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace Roslyn.CodeGeneration
{
public class Program
{
public static void Main(string[] args)
@aybe
aybe / ExampleGame.cs
Created September 29, 2022 22:26 — forked from aethercowboy/ExampleGame.cs
Monogame with IHostedService DI
public class ExampleGame : Game, IGame
{
public Game Game => this;
private readonly ISomeDependency _someDependency;
public ExampleGame(ISomeDependency someDependency)
{
_someDependency = someDependency;
}
@aybe
aybe / BitCrusher.cs
Created October 16, 2016 16:34 — forked from MattRix/BitCrusher.cs
Crusher
public class BitCrusher : MonoBehaviour
{
[Range (1f,16f)]
public float bits = 16f;
[Range (20f,48000f)]
public float sampleRate = 48000f;
private float phase = 0;
private float last = 0;
@aybe
aybe / RTEase.cs
Created October 16, 2016 16:22 — forked from MattRix/RTEase.cs
RTEase - simple easing equations
public static class RTEase
{
public static Func<float,float> Linear = (t) => { return t; };
public static Func<float,float> Instant = (t) => { return t < 1f ? 0f : 1f;};
public static Func<float,float> QuadIn = (t) => { return t * t; };
public static Func<float,float> QuadOut = (t) => { return 2f*t - t*t;};
public static Func<float,float> QuadInOut = (t) => { return (t <= 0.5f) ? (t*t*2f) : (-1.0f + 4f*t + -2f*t*t);};
public static Func<float,float> CubeIn = (t) => { return t * t * t; };
public static Func<float,float> CubeOut = (t) => { return 1f - CubeIn(1f - t); };
public static Func<float,float> CubeInOut = (t) => { return (t <= 0.5f) ? CubeIn(t * 2f) * 0.5f : CubeOut(t * 2f - 1f) * 0.5f + 0.5f; };