Skip to content

Instantly share code, notes, and snippets.

View mstevenson's full-sized avatar

Michael Stevenson mstevenson

View GitHub Profile
@marrub--
marrub-- / MarathonData.md
Last active November 26, 2023 04:33
Marathon + Aleph One Format and Data Documentation (WIP)

Current Version

The current version of this document resides at https://git.greyserv.net/marrub/Maraiah/src/branch/master/doc/data, and contains public domain source code for loading Marathon formats in the Rust programming language.

LICENSING

To the extent possible under law, I, Alison Sanderson, have waived all copyright and related or neighboring rights to this Document as described by the Creative Commons Zero license linked below.

@sinbad
sinbad / License.txt
Last active November 4, 2023 23:10
Unity 2D Line Segment Intersection
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@nobnak
nobnak / UVWorld.cs
Last active August 17, 2023 08:40
UV -> World Position (For Unity)
public class UVWorld : MonoBehaviour {
Mesh _mesh;
Vector3[] _vertices;
int[] _triangles;
Vector2[] _uvs;
Vector3[] _normals;
Triangle2D[] _uvTris;
void Awake() {
_mesh = GetComponent<MeshFilter>().sharedMesh;
@pmeulen
pmeulen / repair-timemachine-disk-network.sh
Created September 22, 2017 17:58
Script to repair a Time Machine network volume
#!/bin/bash
set -e
###############################################################################
# This script tries to repair a Time Machine *network* backup (i.e. an APF
# share containing a sparsebundle) that is shared over a network using e.g. an
# Apple TimeCapsule, a NAS, Raspberry PI, ...
# The script must be run on the computer that created the backup
#
@jackoalan
jackoalan / cwfilt.py
Last active July 28, 2023 00:34
CodeWarrior C++ Symbol Demangler
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
def demangleNode(node):
pointer = False
ref = False
const = False
unsigned = False
@stramit
stramit / CustomEvents.cs
Created September 4, 2014 06:16
Sending Custom Events via the EvenSystem
using System;
using System.Collections.Generic;
using UnityEngine.Events;
// interface you implement in your MB to receive events
public interface ICustomHandler : IEventSystemHandler
{
void OnCustomCode(CustomEventData eventData);
}
@capnslipp
capnslipp / SerializedPropertyValueExtension.cs
Last active June 18, 2023 19:45
Genericized #Unity3D SerializedProperty value access, an extension that should be part of the API.
/// @creator: Slipp Douglas Thompson
/// @license: Public Domain per The Unlicense. See <http://unlicense.org/>.
/// @purpose: Genericized Unity3D SerializedProperty value access.
/// @why: Because this functionality should be built-into Unity.
/// @usage: Use as you would a native SerializedProperty method;
/// e.g. `Debug.Log(mySerializedProperty.Value<Color>());`
/// @intended project path: Assets/Plugins/Editor/UnityEditor Extensions/SerializedPropertyValueExtension.cs
/// @interwebsouce: https://gist.github.com/capnslipp/8516384
using System;
# QEmu
brew install qemu
# Home for out tests
mkdir ~/arm-emu
cd ~/arm-emu
# Download initrd and kernel
wget http://ftp.de.debian.org/debian/dists/jessie/main/installer-armel/current/images/versatile/netboot/initrd.gz
@timoschinkel
timoschinkel / install_unreal_tournament_goty_on_macos.txt
Last active February 6, 2023 08:11
Installing Unreal Tournament GOTY on MacOS Catalina and up
# Installing Unreal Tournament GOTY on MacOS Catalina and up
- Buy game on GoG via https://www.gog.com/game/unreal_tournament_goty
- Download archive set up - Not the download the GoG installer, but download the Unreal Tournament installer (302MB).
- Unpack with `innoextract` (`brew install innoextract`) - Move installer to folder first for scoping.
- Install [UnrealTournamentPatches](https://github.com/OldUnreal/UnrealTournamentPatches/releases) - don't forget to drag the executable to Applications
- In Finder, go to Applications, right click `UnrealTournament` and click `Show package contents`
- Inside the package contents navigate to `Contents` > `MacOS`
- Copy the folders `Maps`, `Music`, `Sounds` and `Textures` from the unpacked Unreal Tournament installer and paste them in the `Contents` > `MacOS` folder.
- Profit!
@filod
filod / AsmdefDebug.cs
Created January 8, 2019 10:00 — forked from angularsen/AsmdefDebug.cs
Find out what assemblies are being built and how long each takes. Updated to only build for Editor, and to include total time in first line of log output.
#if UNITY_EDITOR
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using UnityEditor;
using UnityEditor.Compilation;
using UnityEngine;
/// <summary>