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
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
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
Show hidden characters
{ | |
"cmd": ["gcc", "${file}", "-o", "${file_path}/${file_base_name}", "-Wall"], | |
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
"working_dir": "${file_path}", | |
"selector": "source.c", | |
"variants": | |
[ | |
{ | |
"name": "Run", |
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
/// @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; |
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
# 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 |
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
import maya.cmds as cmds | |
# Close ports if they were already open under another configuration | |
try: | |
cmds.commandPort(name=":7001", close=True) | |
except: | |
cmds.warning('Could not close port 7001 (maybe it is not opened yet...)') | |
try: | |
cmds.commandPort(name=":7002", close=True) | |
except: |
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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
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
class DataBuffer { | |
var internalData: NSData; | |
init(fromData: NSData) { | |
self.internalData = NSData.dataWithData(fromData) as NSData; | |
} | |
init(fromFilePath: String) { | |
self.internalData = NSData.dataWithContentsOfFile(fromFilePath, options: .DataReadingMappedIfSafe, error: nil) as NSData; | |
} |
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
# opening and closing windows and popovers | |
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false | |
# smooth scrolling | |
defaults write -g NSScrollAnimationEnabled -bool false | |
# showing and hiding sheets, resizing preference windows, zooming windows | |
# float 0 doesn't work | |
defaults write -g NSWindowResizeTime -float 0.001 |
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; | |
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! |
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 UnityEngine.Events; | |
// interface you implement in your MB to receive events | |
public interface ICustomHandler : IEventSystemHandler | |
{ | |
void OnCustomCode(CustomEventData eventData); | |
} |