Skip to content

Instantly share code, notes, and snippets.

View juanitogan's full-sized avatar
💭
Ninja kitten!

Matt Jernigan juanitogan

💭
Ninja kitten!
View GitHub Profile
@bellicapax
bellicapax / StringIntDictionary.cs
Created February 27, 2018 01:07
An example implementation of a serializable Dictionary<string, int>
using UnityEngine;
namespace System.Collections.Generic
{
[Serializable]
public class StringIntTuple : SerializableKeyValuePair<string, int>
{
public StringIntTuple(string item1, int item2) : base(item1, item2) { }
}
@bellicapax
bellicapax / SerializableDictionary.cs
Last active February 23, 2023 21:35
Serializable Dictionary base for Unity
using UnityEngine;
namespace System.Collections.Generic
{
[Serializable]
public abstract class SerializableDictionary<TKey, TValue> : Dictionary<TKey, TValue>, ISerializationCallbackReceiver
{
protected abstract List<SerializableKeyValuePair<TKey, TValue>> _keyValuePairs { get; set; }
// save the dictionary to lists
@wislon
wislon / keymap.cson
Last active May 7, 2021 22:06
Atom key bindings for numeric keypad
# some additional keybindings that let you use the keypad as arrows (old-school)
'.editor':
'num-left': 'core:move-left'
'num-right': 'core:move-right'
'num-up': 'core:move-up'
'num-down': 'core:move-down'
'num-end' : 'editor:move-to-end-of-screen-line'
'num-home' : 'editor:move-to-first-character-of-line'
'num-pageup': 'core:page-up'