Skip to content

Instantly share code, notes, and snippets.

AngryAnt / user-callback
Created Dec 11, 2019
User callback script for BackInTime handling mount & unmount of encrypted backup target and using the modify date of a file to communicate last snapshot date.
View user-callback
# Copyright (c) 2012-2015 Germar Reitze
# Mount/unmount implementation 2019 Emil "AngryAnt" Johansen
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
View Jerboa.swift
// main.swift
// Jerboa
// Created by Emil Johansen on 19/01/2019.
// Copyright © 2019 AngryAnt. All rights reserved.
AngryAnt / Drawer.cs
Last active Mar 18, 2021
Attempting to override the default UnityEvent drawer.
View Drawer.cs
using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine.Events;
using System.Reflection;
namespace Test
[CustomPropertyDrawer (typeof (UnityEventBase), true)]
View CoreCharacterInstance.cs
using UnityEngine;
public class CoreCharacterInstance : MonoBehaviour
[SerializeField] CoreCharacter m_CoreCharacter;
[SerializeField] Character m_Character;
void Reset ()

Keybase proof

I hereby claim:

  • I am angryant on github.
  • I am angryant ( on keybase.
  • I have a public key ASD8ySmPVOXxJ6-08vcEIoK2yFrxwh6eUfa6DgVY6EuKSwo

To claim this, I am signing this object:

AngryAnt / MoveComponentContext.cs
Last active Jul 5, 2017
Adds "Move to Top" and "Move to Bottom" items to the inspector context menu of components.
View MoveComponentContext.cs
using UnityEngine;
using UnityEditor;
public class MoveComponentContext
enum Destination
AngryAnt / BehaveExtensions.cs
Last active Aug 29, 2015
Tree.ReflectClassForwards (GameObject) and Tree.SetForwards (int id, IActionClass actionClass). This is now built-in per Behave 2.6.
View BehaveExtensions.cs
using UnityEngine;
using Behave.Runtime;
using Library = BLYourLibraryName;
using Tree = Behave.Runtime.Tree;
public interface IActionClass
bool OnForward (Tree sender);
BehaveResult Init (Tree sender);
View Levels.cs
const int
kPreLevelScenes = 2, // Number of scenes before the first level (splash, menu, etc.)
kPostLevelScenes = 0; // Number of scenes after last level (score, credits, whatever)
const string kLevelScorePrefix = "Score for level ";
// ...
void OnLevelBeat ()
if (Application.loadedLevel < Application.levelCount - kPostLevelScenes - 1)
View CoroutineData.cs
using UnityEngine;
using System.Collections;
using System.Threading;
using System.Reflection;
public delegate IEnumerator MonitorCoroutine<T> (CoroutineData<T> data);
AngryAnt / DependencyInstall.cs
Last active Dec 30, 2015
A quick example demonstrating how unpacking logic for an asset store package could be set up to be contingent on the presence of a specific code dependency.
View DependencyInstall.cs
foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies ())
string location = Path.GetDirectoryName (assembly.CodeBase).Replace (Path.DirectorySeparatorChar, '/');
if (location.StartsWith ("file:"))
location = location.Substring ("file:".Length);
if (!location.BeginsWith (Application.dataPath.Substring (0, Application.dataPath.Length - "Assets".Length)))