Skip to content

Instantly share code, notes, and snippets.

View momo-the-monster's full-sized avatar

Momo the Monster momo-the-monster

View GitHub Profile
@define-private-public
define-private-public / HttpServer.cs
Last active March 9, 2025 22:07
A Simple HTTP server in C#
// Filename: HttpServer.cs
// Author: Benjamin N. Summerton <define-private-public>
// License: Unlicense (http://unlicense.org/)
using System;
using System.IO;
using System.Text;
using System.Net;
using System.Threading.Tasks;
@paraself
paraself / EditorPlayMode
Last active October 30, 2023 14:38
Unity Play Mode Detection
//originally adopted from
//http://answers.unity3d.com/questions/447701/event-for-unity-editor-pause-and-playstop-events.html
//with a few modifications which makes the event firing nicer and cleaner
//Usage Example :
//
//using UnityEditor;
//using UnityEngine;
//
//[InitializeOnLoad]
//public class SingleEntryPoint
@nothke
nothke / PitchShift.cs
Last active December 18, 2022 01:40
Unity C# Keyboard keys to pitch of a sound conversion
///
/// Changes pitch of any audio clip to match a pressed key on a (piano) keyboard
/// if a sound is in C4 (440hz) then it will perfectly match the scale
/// by Nothke
///
/// QWERTY.. row for white keys
/// 12345... row for black keys
/// press C to toggle chord mode in game
/// press N or M for minor or major
/// press A to toggle arpeggiate
@robinsound
robinsound / SimpleGemInstaller.nsi
Last active November 3, 2021 01:00
NSIS script for Ruby, Git and DevKit installers. Then install a gem
!include LogicLib.nsh ;IF ELSE
!include "StrContains.nsh"
AutoCloseWindow true
OutFile "SimpleGemInstaller.exe"
;here you can reference to any other ruby version and set you prefer path
;you can use !define for compile time substitution