View AnimatorRenameDialogue.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEngine; | |
using Object = UnityEngine.Object; | |
/// <summary> | |
/// Dialogue that allows to rename objects in the Hierarchy of an <see cref="Animator"/> without breaking the AnimationClip bindings | |
/// </summary> |
View AutoSaver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Editor tools for auto-saving | |
/// </summary> | |
public static class AutoSaving | |
{ | |
private const string k_MenuName = "Examples/Auto-Save/"; | |
private static class IntervalAutoSaving | |
{ | |
/// <summary> |
View AnimatorTriggerResetter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class AnimatorTriggerResetter : StateMachineBehaviour | |
{ | |
override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) | |
{ | |
foreach(var p in animator.parameters) | |
{ | |
if (p.type == AnimatorControllerParameterType.Trigger) | |
{ |
View EnumMap.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; | |
namespace DerHugo | |
{ | |
#if UNITY_EDITOR | |
/// <summary> | |
/// Non generic base class for <see cref="EnumMap{TKey,TValue}"/> for drawers |
View ObservedList.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class ObservedList { } | |
[Serializable] | |
public class ObservedList<T> : ObservedList, IList<T> | |
{ | |
public delegate void ChangedDelegate(int index, T oldValue, T newValue); | |
// In a bit of a dirty hack the editor scripts is looking for this field | |
// with exactly this name "_list" | |
[SerializeField] private List<T> _list = new List<T>(); |
View Triangle2D.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine; | |
/// <summary> | |
/// To store triangle data to get cleaner code | |
/// </summary> | |
[Serializable] | |
public struct Triangle2D | |
{ |
View InstallSheepitAsAService.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################################### | |
# This Script creates a service and a dedicated user # | |
# for running sheepit-client (www.sheepit.com) on a headless # | |
# Linux-Server # | |
# # | |
# Author of this script is: jerome.poenisch@gmail.com # | |
############################################################### | |
############################################################### |
View update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
######################### | |
## returns: | |
# 0 - success | |
# 1 - success : Requires reboot | |
# 2 - updated failed | |
# 3 - upgrade failed | |
# 4 - dist-upgrade failed | |
# 5 - autoremove failed |
View iptables.up.rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*filter | |
:OUTPUT ACCEPT [0:0] | |
:FORWARD DROP [0:0] | |
:UDP - [0:0] | |
:INPUT DROP [0:0] | |
:TCP - [0:0] | |
:ICMP - [0:0] | |
# Acceptable TCP traffic | |
-A TCP -p tcp --dport 22 -j ACCEPT | |
-A TCP -p tcp --dport 10000 -j ACCEPT |