Skip to content

Instantly share code, notes, and snippets.

View grigb's full-sized avatar

Grig grigb

View GitHub Profile
@grigb
grigb / .gitignore
Created October 1, 2019 06:05
Git Ignore for Unity
# ===========================
# Default Collab Ignore Rules
# ===========================
# OS Generated
# ============
.DS_Store
._*
.Spotlight-V100
.Trashes
@grigb
grigb / Singleton.cs
Created October 1, 2019 06:04
Unity Singleton
using UnityEngine;
/// <summary>
/// Be aware this will not prevent a non singleton constructor
/// such as `T myT = new T();`
/// To prevent that, add `protected T () {}` to your singleton class.
///
/// As a note, this is made as MonoBehaviour because we need Coroutines.
/// </summary>
public class Singleton<T> : MonoBehaviour where T : MonoBehaviour
@grigb
grigb / MacMailToCSV.py
Last active September 10, 2018 03:06
Convert an exported Mac Mail mbox file into CSV for data mining
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# assumes your file is called mbox
# writes to a file called mbox.csv
import mailbox
import csv