Skip to content

Instantly share code, notes, and snippets.

View CTNOriginals's full-sized avatar
💼
Working hard or hardly working

CTN CTNOriginals

💼
Working hard or hardly working
View GitHub Profile
@RodGreen
RodGreen / SwitchShortcutsProfileOnPlay.cs
Created September 12, 2019 21:54
Automatically switches editor shortcut profile when playing Unity3D
using UnityEngine;
using UnityEditor;
using UnityEditor.ShortcutManagement;
using System.Linq;
[InitializeOnLoad]
public class SwitchShortcutsProfileOnPlay
{
private const string PlayingProfileId = "Playing";
private static string _activeProfileId;
@grihabor
grihabor / Makefile.version
Last active April 22, 2025 15:01
Makefile to use for incremental semantic versioning
MAKE := make --no-print-directory
DESCRIBE := $(shell git describe --match "v*" --always --tags)
DESCRIBE_PARTS := $(subst -, ,$(DESCRIBE))
VERSION_TAG := $(word 1,$(DESCRIBE_PARTS))
COMMITS_SINCE_TAG := $(word 2,$(DESCRIBE_PARTS))
VERSION := $(subst v,,$(VERSION_TAG))
VERSION_PARTS := $(subst ., ,$(VERSION))