This file contains hidden or 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 "TestCGBitmapContextCreate_iOSTests.h" | |
@implementation TestCGBitmapContextCreate_iOSTests | |
- (void)setUp | |
{ | |
[super setUp]; |
This file contains hidden or 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
// @source: https://gist.github.com/darktable/2018687#file-guiscaler-cs | |
using System; | |
using System.Collections; | |
using UnityEngine; | |
/// Usage: | |
/// (optional) Call GUIScaler.Initialize() in Start(), Awake() or OnEnable() (only needed once) |
This file contains hidden or 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 System.Collections; | |
public class OrderTester : MonoBehaviour { | |
void Update() { Debug.Log("Update()"); } | |
void LateUpdate() { Debug.Log("LateUpdate()"); } | |
void FixedUpdate() { Debug.Log("FixedUpdate()"); } | |
void Awake() { Debug.Log("Awake()"); } | |
void Start() { Debug.Log("Start()"); } | |
void Reset() { Debug.Log("Reset()"); } |
This file contains hidden or 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
/// @usage: Use as you would a native Matrix4x4 method; | |
/// e.g. `this.transform.localToWorldMatrix.IsActuallyIdentity()` | |
/// @usage: Lives best within `Assets/Plugins/`. | |
using UnityEngine; | |
public static class Matrix4x4Extensions | |
{ |
This file contains hidden or 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
struct Plainy | |
{ | |
public: | |
readonly: | |
int foo; | |
int bar; | |
} | |
static class Clingy |
This file contains hidden or 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 hidden or 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: HideInNormalInspector attribute, to hide fields in the normal Inspector but let them show in the debug Inspector. | |
/// @why: Because this functionality should be built-into Unity. | |
/// @usage: Add `[HideInNormalInspector]` as an attribute to public fields you'd like hidden when Unity's Inspector is in “Normal” mode, but visible when in “Debug” mode. | |
/// @intended project path: Assets/Plugins/EditorUtils/HideInNormalInspectorAttribute.cs | |
/// @interwebsouce: https://gist.github.com/capnslipp/8138106 | |
using UnityEngine; |
This file contains hidden or 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
slippyd@silverdelicious:~$ cd Desktop/ | |
# cloning git repo from github: | |
slippyd@silverdelicious:~/Desktop$ git clone [email protected]:capnslipp/p001.git p001_git | |
Cloning into 'p001_git'... | |
remote: Counting objects: 3360, done. | |
remote: Compressing objects: 100% (870/870), done. | |
remote: Total 3360 (delta 2407), reused 3331 (delta 2380) |
This file contains hidden or 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
#!/bin/sh | |
# | |
# Hook script that blocks pushing of branches and tags with the form 'wip/*', and commits commits the log message starts | |
# with "WIP" (work in progress).. | |
# | |
# This hook is called with the following parameters: | |
# | |
# $1 -- Name of the remote to which the push is being done | |
# $2 -- URL to which the push is being done | |
# |
This file contains hidden or 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
double (^multiplyTwoValues)(double, double) = ^(double firstValue, double secondValue) { | |
return firstValue * secondValue; | |
}; | |
double result = multiplyTwoValues(2, 4); | |
// or | |
typedef double (^CombineTwoValuesBlock)(double firstValue, double secondValue); |