Skip to content

Instantly share code, notes, and snippets.

@MattRix
MattRix / RXDivider.cs
Last active May 1, 2024 18:15
Adds dividers into the inspector. Based on a brilliant idea by Matthew Wegner, see: https://twitter.com/mwegner/status/355147544818495488
//Based on a brilliant idea by Matthew Wegner - https://twitter.com/mwegner/status/355147544818495488
//Code for drawing the base PropertyDrawers is from here: http://forum.unity3d.com/threads/173401-Getting-Default-SerializedProperty-Drawing-within-a-PropertyDrawer?p=1186347&viewfull=1#post1186347
//My implementation is super lazy with magic numbers everywhere! :D
#if UNITY_EDITOR
using System;
using UnityEngine;
using System.Collections.Generic;
using UnityEditor;
//pairing heap
//{elem:object, subheaps:[array of heaps]}
//subheaps might should be a linked list
function PairingHeap(obj) {
this.elem = obj;
this.subheaps = [];
}
function min(heap) {
return heap.elem;
@stefanschmidt
stefanschmidt / remove-annotations.sh
Last active February 1, 2024 17:01
Remove all annotations from a PDF document
pdftk original.pdf output uncompressed.pdf uncompress
LANG=C sed -n '/^\/Annots/!p' uncompressed.pdf > stripped.pdf
pdftk stripped.pdf output final.pdf compress
@jtdressel
jtdressel / .gitignore_global
Created February 22, 2012 19:06
My global .gitignore file
#http://help.github.com/ignore-files/
#http://sujee.net/tech/articles/gitignore/
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o