Skip to content

Instantly share code, notes, and snippets.

View mstevenson's full-sized avatar

Michael Stevenson mstevenson

View GitHub Profile
@neon-izm
neon-izm / GameWindowMover.cs
Created August 13, 2014 08:31
unity editor script: UnityEditor GameView automatically move to "Rift DK2 Extend Display"
using UnityEngine;
using UnityEditor;
//Version 0.21 | twitter:@izm update for DK2
//Version 0.2 | s.b.Newsom Edition
//Source from http://answers.unity3d.com/questions/179775/game-window-size-from-editor-window-in-editor-mode.html
//Modified by seieibob for use at the Virtual Environment and Multimodal Interaction Lab at the University of Maine.
//Use however you'd like!
@krry
krry / os-x-for-hackers
Last active January 15, 2021 05:54 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers mods
# to run this script in one step, copy/paste/execute the following:
# bash <(curl -s https://gist.githubusercontent.com/krry/9263570/raw/878797c4e54f9de71137699544567c6bd2d4f6c4/os-x-for-hackers)
#!/usr/bin/env bash
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
sudo -v
@janderit
janderit / ZmqPollPool.cs
Created September 10, 2012 15:48
ZeroMQ 3.2 Single threaded container
/// <summary>
/// Encapsulates a zeroMQ context and a worker thread.
/// Use the ZmqPollPool to server multiple 0mq sockets with single-threaded semantics.
///
/// Use MarshalAndWait or MarshalAsync to marshal 0mq context access to the working thread.
/// Call Dispose to close all registered sockets and terminate the context and thread.
/// </summary>
public class ZmqPollPool : IDisposable
{
private TimeSpan _pollTimeout;
@Kink3d
Kink3d / UI-DitheredClip.shader
Created February 18, 2018 11:08
An alpha clip version on Unity's default UI shader with a dithered variant
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
Shader "UI/DitheredClip"
{
Properties
{
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
_StencilComp ("Stencil Comparison", Float) = 8
@dreness
dreness / fix-synalize-it.md
Last active August 14, 2022 14:32
A somewhat brutal repair of Synalize It! Pro for macOS, which is broken by linking against the system-provided python which no longer exists.

check current python linkage

% otool -L /Applications/Synalyze\ It\!\ Pro.app/Contents/MacOS/Synalyze\ It\!\ Pro | grep Python
	/System/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.16)

Download and install Python2.7.16 for macOS. By default this lands in /Library/Frameworks/Python.framework/Versions/2.7

Make a copy of the Synalize It! Pro app bundle, e.g. to your desktop.

cp -R /Applications/Synalyze\ It\!\ Pro.app ~/Desktop
@michaelbartnett
michaelbartnett / LICENSE.txt
Last active October 17, 2022 10:29
Tuple implementation for use with Unity3d
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@filod
filod / AsmdefDebug.cs
Created January 8, 2019 10:00 — forked from angularsen/AsmdefDebug.cs
Find out what assemblies are being built and how long each takes. Updated to only build for Editor, and to include total time in first line of log output.
#if UNITY_EDITOR
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using UnityEditor;
using UnityEditor.Compilation;
using UnityEngine;
/// <summary>
@timoschinkel
timoschinkel / install_unreal_tournament_goty_on_macos.txt
Last active February 6, 2023 08:11
Installing Unreal Tournament GOTY on MacOS Catalina and up
# Installing Unreal Tournament GOTY on MacOS Catalina and up
- Buy game on GoG via https://www.gog.com/game/unreal_tournament_goty
- Download archive set up - Not the download the GoG installer, but download the Unreal Tournament installer (302MB).
- Unpack with `innoextract` (`brew install innoextract`) - Move installer to folder first for scoping.
- Install [UnrealTournamentPatches](https://github.com/OldUnreal/UnrealTournamentPatches/releases) - don't forget to drag the executable to Applications
- In Finder, go to Applications, right click `UnrealTournament` and click `Show package contents`
- Inside the package contents navigate to `Contents` > `MacOS`
- Copy the folders `Maps`, `Music`, `Sounds` and `Textures` from the unpacked Unreal Tournament installer and paste them in the `Contents` > `MacOS` folder.
- Profit!
# QEmu
brew install qemu
# Home for out tests
mkdir ~/arm-emu
cd ~/arm-emu
# Download initrd and kernel
wget http://ftp.de.debian.org/debian/dists/jessie/main/installer-armel/current/images/versatile/netboot/initrd.gz
@capnslipp
capnslipp / SerializedPropertyValueExtension.cs
Last active June 18, 2023 19:45
Genericized #Unity3D SerializedProperty value access, an extension that should be part of the API.
/// @creator: Slipp Douglas Thompson
/// @license: Public Domain per The Unlicense. See <http://unlicense.org/>.
/// @purpose: Genericized Unity3D SerializedProperty value access.
/// @why: Because this functionality should be built-into Unity.
/// @usage: Use as you would a native SerializedProperty method;
/// e.g. `Debug.Log(mySerializedProperty.Value<Color>());`
/// @intended project path: Assets/Plugins/Editor/UnityEditor Extensions/SerializedPropertyValueExtension.cs
/// @interwebsouce: https://gist.github.com/capnslipp/8516384
using System;