Skip to content

Instantly share code, notes, and snippets.

@EliteMasterEric
EliteMasterEric / Eric's EZ Guide to Harmony Patches.md
Created August 16, 2025 22:14
A guide to creating Prefix and Postfix patches in Harmony, for beginner Unity modders.

Introduction to BepInEx

(If you understand how BepInEx works and what it does, you can skip this and go to the next section.)

Modding Unity games is pretty standardized in 2025. In general, you have to create your mod code in C#, build it into a DLL file, then convince the game to execute your code.

There are two ways of doing this. The first is if the game has a mod loader built in, you just have to create and install mods based on their instructions. Games that work like this include Rimworld and Oxygen Not Included, and games that work like this generally have Steam Workshop support or some other standard way of distributing mods.

The other way is that if the game doesn't natively support mods, you can use BepInEx. BepInEx is a modloader, similar to Fabric for Minecraft. BepInEx works by placing a winhttp.dll file in your game folder, which does all the same things as the winhttp.dll file in your System32 folder, but it also tells it to load the code in the BepInEx DLL. From there, BepInEx can de

During the past days, this great article by Sam Pruden has been making the rounds around the gamedev community. While the article provides an in-depth analysis, its a bit easy to miss the point and exert the wrong conclusions from it. As such, and in many cases, users unfamiliar with Godot internals have used it points such as following:

  • Godot C# support is inefficient
  • Godot API and binding system is designed around GDScript
  • Godot is not production ready

In this brief article, I will shed a bit more light about how the Godot binding system works and some detail on the Godot

@paulloz
paulloz / InputMapGenerator.cs
Last active July 3, 2024 11:26
Constants generator from Godot's input map
using Microsoft.CodeAnalysis;
using System.Collections.Immutable;
using System.Linq;
using System.Text;
namespace SourceGenerators;
[Generator(LanguageNames.CSharp)]
public class InputMapGenerator : IIncrementalGenerator
{
@davidfowl
davidfowl / .NET6Migration.md
Last active March 7, 2026 11:20
.NET 6 ASP.NET Core Migration
@Josrph
Josrph / RefitRouteAnalyzer.cs
Last active March 10, 2025 21:17
Roslyn-based Refit Route Analyzer.
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class RefitRouteAnalyzer : DiagnosticAnalyzer
{
private const string Category = "Routing";
public const string DiagnosticId = "RefitRouteAnalyzer";
private static readonly DiagnosticDescriptor AttributeRule = new DiagnosticDescriptor(
DiagnosticId,
title: "Route string should match method signature",
messageFormat: "Attribute name '{0}' contains incorrect route",
@richlander
richlander / modernizing-csharp9.md
Last active April 26, 2024 17:14
Modernizing a codebase for C# 9

Modernizing a codebase for C# 9

There are lots of cases that you can improve. The examples use nullable reference types, but only the WhenNotNull example requires it.

Use the property pattern to replace IsNullorEmpty

Consider adopting the new property pattern, wherever you use IsNullOrEmpty.

string? hello = "hello world";
@raveenb
raveenb / ssh_into_android.md
Last active March 4, 2026 00:44
SSH into Android

Connecting to an Android device over SSH

Initial Setup

Install Android App Termux from APKPure or AppStore. If the app exists, just delete and re-install it to get the latest version, The APK can be downloaded from https://apkpure.com/termux/com.termux/ Install the APK using by running

adb install ~/Downloads/Termux_v0.73_apkpure.com.apk
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active March 26, 2026 11:32
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !