Skip to content

Instantly share code, notes, and snippets.

@harold-b
harold-b / readme.md
Last active January 22, 2025 20:10
SDL3 Odin Bindings
@p1xelHer0
p1xelHer0 / miniaudio_from_memory.odin
Created April 21, 2024 10:45
Play audio files from memory with Odin #load
package audio
import "core:fmt"
// https://miniaud.io/docs/
import ma "vendor:miniaudio"
// 0 - Use native channel count of the device
AUDIO_CHANNELS :: 0
AUDIO_SAMPLE_RATE :: 0
@reitowo
reitowo / aes-ctr.cs
Created January 1, 2022 11:04
Stream Crypto AES-256-CTR C# Implementation
using System.Security.Cryptography;
namespace TgServer.Crypto;
public sealed class AesCtr {
private readonly byte[] _key;
private readonly byte[] _counter;
private readonly byte[] _blockKey;
private readonly ICryptoTransform _encryptor;
@ishad0w
ishad0w / aveyo_edge_removal.bat
Last active July 12, 2025 07:18
AveYo (Microsoft Edge Removal)
@(set "0=%~f0"^)#) & powershell -nop -c iex([io.file]::ReadAllText($env:0)) & exit /b
#:: just copy-paste into powershell - it's a standalone hybrid script
sp 'HKCU:\Volatile Environment' 'Edge_Removal' @'
$also_remove_webview = 1
## why also remove webview? because it is 2 copies of edge, not a slimmed down CEF, and is driving bloated web apps
$also_remove_widgets = 1
## why also remove widgets? because it is a webview glorified ad portal on msn and bing news cathering to stupid people
$also_remove_xsocial = 1
## why also remove xsocial? because it starts webview setup every boot - xbox gamebar will still work without the social crap
@gingerBill
gingerBill / microui_raylib_demo.odin
Created October 2, 2021 23:17
microui + raylib Demo in Odin
package microui_raylib
import "core:fmt"
import "core:unicode/utf8"
import rl "vendor:raylib"
import mu "vendor:microui"
state := struct {
mu_ctx: mu.Context,
log_buf: [1<<16]byte,
@TheSpydog
TheSpydog / fna-wasm-instructions.md
Last active February 12, 2025 22:53
How to build your FNA game for WebAssembly

How to build your FNA game for WebAssembly

WARNING: This process is EXTREMELY experimental and not officially supported yet!

Thanks to the ongoing work on .NET WebAssembly support, it is now possible to build FNA games for the web!

If you decide to give this a try, be sure to tell us about it in the FNA Discord! I'm happy to help if you run into problems or have any further questions that are not answered here.

The Basics

@lamchau
lamchau / README.rst
Last active April 17, 2025 12:48
[Chrome/Tampermonkey] Extract *.user.js scripts from LevelDB backup

Restoring Tampermonkey scripts

Chrome stores .user.js scripts in a .ldb, which isn't in a user accessible format to recovery. On some versions of macOS the provided python script can't compile the leveldb package. As a workaround, we can use the node level package to recover our userscripts.

Prerequisite

@xHeaven
xHeaven / CloudflareHttpHandler.cs
Created August 27, 2020 09:41
Cloudflare http handler in C# allows scraping cloudflare protected websites
using System;
using System.Net.Http;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using Microsoft.ClearScript.V8;
@dcronqvist
dcronqvist / HelloTriangle.cs
Last active March 19, 2024 18:15
A quick OpenGL HelloTriangle program in C#, useful for testing and getting started.
using System;
using DotGLFW;
using static DotGL.GL;
class Program
{
/// <summary>
/// Obligatory name for your first OpenGL example program.
/// </summary>
private const string TITLE = "Hello Triangle!";
@dcronqvist
dcronqvist / GL.cs
Created August 12, 2020 21:52
Bindings for OpenGL 3.3 Core Profile in C#
using System;
using System.Linq;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
namespace OpenGL
{
/// <summary>
/// Returns a function pointer for the OpenGL function with the specified name.