Skip to content

Instantly share code, notes, and snippets.

View WamWooWam's full-sized avatar
🏳️‍🌈

Thomas May WamWooWam

🏳️‍🌈
  • Wan Kerr Co. Ltd.
  • Nowhere, Ireland
  • 07:55 (UTC +01:00)
  • X @da_wamwoowam
View GitHub Profile
@WamWooWam
WamWooWam / RainbowBloom.cs
Last active May 1, 2022 20:43
Sonic Colours-style bloom implemented as a Unity PostProcessEffect
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;
[Serializable]
[PostProcess(typeof(RainbowBloomRenderer), PostProcessEvent.AfterStack, "Rainbow/Bloom")]
@WamWooWam
WamWooWam / Extractor.cs
Created May 21, 2021 14:42
Small tool to extract backgrounds from LiveSplit LSL files
using System;
using System.IO;
using System.Drawing;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Xml;
class Program
{
static void Main(string[] args)
@WamWooWam
WamWooWam / ListViewBehaviour.cs
Last active May 18, 2021 16:04
A set of attached properties to stretch GridViewItem/ListViewItems to fill their parent fully.
using System;
using Windows.UI.Xaml; // or Microsoft.UI.Xaml
using Windows.UI.Xaml.Controls; // or Microsoft.UI.Xaml.Controls
namespace Unicord.Universal.Behaviours
{
public class ListViewBehaviour
{
/// <summary>
/// This property specifies the minium width for child items in an items wrap grid panel.
@WamWooWam
WamWooWam / .net-standard-2.0-uwp.md
Last active December 7, 2022 10:51
How to use .NET Standard 2.0 under UWP <= 10.0.15063

Enabling .NET Standard support on UWP apps targeting 15063 or below is relatively simple.

Step 1

Set your project's TargetPlatformMinVersion to anything above 15063, for this I've always used 16299 but other SDKs should work the same way

step-1

Step 2

Open your .csproj file in a text editor (right click, "Unload project", right click again, "Edit project file"), and add the following 2 lines to the first property group.

@WamWooWam
WamWooWam / Main.cpp
Created December 12, 2020 12:29
ASP.NET Core + C++/CLI
#include "pch.h"
#include "Startup.h"
using namespace System;
using namespace Microsoft::AspNetCore;
using namespace Microsoft::AspNetCore::Hosting;
using namespace Microsoft::Extensions::Hosting;
using namespace Microsoft::Extensions::Logging;
int main(array<System::String ^> ^args)
@WamWooWam
WamWooWam / PlayGTAV.cs
Last active November 11, 2021 02:52
Replacement PlayGTAV.exe for the Epic Games Store version of Grand Theft Auto V
using System.Diagnostics;
using System.IO;
using Microsoft.Win32;
//
// If you replace PlayGTAV.exe in your game folder with this code, it'll fix two problems:
// - The game will launch successfully if you simply double click PlayGTAV.exe (it'll actually launch EGS properly)
// - You won't have to accept a UAC prompt every time you launch the game
// - If the exe doesn't find Rockstar Social Club, it'll try and install it from the default location
//
@WamWooWam
WamWooWam / EnumDumper.cs
Created April 18, 2020 13:22
A tool that dumps any .NET Enums to readable TypeScript
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace EnumDumper
{
static class Program
{
@WamWooWam
WamWooWam / Sonic4AMB.cs
Created April 9, 2020 22:37
Sonic 4 PC AMB Repacker
using System;
using System.IO;
using System.Text;
namespace AMBRepack
{
class Program
{
private const uint MAGIC = 0x424d4123u; // #AMB
private const uint MAGIC_2 = 0x00000020u;
@WamWooWam
WamWooWam / Anim2Xml.cs
Created March 15, 2020 22:04
Converts from .uv-anim to .xml and back.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HedgeLib.Animations;
namespace Anim2Xml
{
// DangerBin.cpp : Plays audio at an increasing volume the nearer the pointer is to the Recycle Bin.
// Compile with anything targeting the Windows 8.1 SDK or later
#include <iostream>
#include <wrl.h>
#include <shlobj.h>
#include <exdisp.h>
#include <comutil.h>
#include <roapi.h>
#include <shlwapi.h>