Skip to content

Instantly share code, notes, and snippets.

View ntratcliff's full-sized avatar
🌱

Noah Ratcliff ntratcliff

🌱
View GitHub Profile
@ntratcliff
ntratcliff / WaitForEvent.cs
Created June 28, 2022 15:40
A custom yield instruction that waits for an arbitrary event
using System;
using MacSalad.Core.Events;
using UnityEngine;
namespace AeLa.Utilities
{
public class WaitForEvent<T> : CustomYieldInstruction
where T : MSEvent
{
public override bool keepWaiting => keepWaitingInternal;
@ntratcliff
ntratcliff / CoroutineUtils.cs
Last active June 28, 2022 15:20
Handy Unity coroutine utilities.
using System;
using System.Collections;
using System.Diagnostics.CodeAnalysis;
using UnityEngine;
namespace AeLa.Utilities
{
public static class CoroutineUtils
{
public static IEnumerator DoNextFrame(Action action)
@ntratcliff
ntratcliff / typos.sh
Last active June 7, 2022 15:27
Git push typo aliases
# In .gitconfig
[alias]
# other aliases here...
# typos
psuh = "!psuh() { echo 'psuh dude 🤙'; git push; }; psuh"
ush = "!ush() { echo 'what would you do without yourself? 🙄'; git push; }; ush"
# In .bashrc/.zshrc/etc
alias gitp=git
@ntratcliff
ntratcliff / FBSDKWorkaround.cs
Created June 11, 2020 11:08
A workaround for missing header file in Unity iOS builds with the Facebook SDK https://github.com/facebook/facebook-sdk-for-unity/issues/359
// workaround for missing header file bug
// remove when FB SDK patched (tracker: https://github.com/facebook/facebook-sdk-for-unity/issues/359)
#if UNITY_2019_3_OR_NEWER
using System.IO;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEngine;
namespace AeLa.Editor
@ntratcliff
ntratcliff / WebWindow.cs
Last active May 19, 2017 15:59
Utility class for displaying a webpage in the Unity Editor. Supports Unity 5.0+
using UnityEngine;
using UnityEditor;
using System;
using System.Reflection;
/// <summary>
/// Displays a webpage in the editor.
/// </summary>
public class WebWindow : ScriptableObject
{
@ntratcliff
ntratcliff / The Technical Interview Cheat Sheet.md
Last active December 2, 2018 15:30 — forked from tsiege/The Technical Interview Cheat Sheet.md
Forked technical interview cheat sheet.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

Array

Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.