Skip to content

Instantly share code, notes, and snippets.

View BlueRyth's full-sized avatar

Jeff Williams BlueRyth

  • Raleigh, NC
View GitHub Profile
@BlueRyth
BlueRyth / A talk on swaps:
Last active August 29, 2015 14:15
On the topic of swaps...
The xor swap is a fairly well-known optimization used in lower level languages
to swap the value between two variables without the need for temporary storage.
Almost everyone has an opinion on it. It avoids allocation. It reduces
readability. It's great! It's bad!
Working in VS2013, let's take a look at what C++ does to the swap after
optimization. A dynamic environment is required to keep the compiler from
making too many optimizations like using constant values, unrolling loops, etc.
I'll be setting up a test with arrays of random values on the heap, iterating
over the elements and swapping their values.
@BlueRyth
BlueRyth / SyncAnimationControllerTool.cs
Last active August 7, 2018 13:53
Unity3D: Sync the Animation window to an Animator without requiring hierarchy selection (4.6.x)
using System;
using System.Reflection;
using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
/// <summary>
/// Class to synchronize the view of the Animator window without requiring hierarchy selection
/// </summary>
class SyncAnimationControllerTool
@BlueRyth
BlueRyth / keybase.md
Created September 22, 2014 21:29
Keybase Proof

Keybase proof

I hereby claim:

  • I am blueryth on github.
  • I am blueryth (https://keybase.io/blueryth) on keybase.
  • I have a public key whose fingerprint is E03A F5EC B4EE ECDE B340 0FCC 7F69 A0DA 876F 7BEC

To claim this, I am signing this object: