Skip to content

Instantly share code, notes, and snippets.

View ncthbrt's full-sized avatar
🧶
Coding

Natalie Cuthbert ncthbrt

🧶
Coding
View GitHub Profile
@ncthbrt
ncthbrt / BadOutput.msl
Last active January 5, 2024 08:44
Weird behavioural differences between cli and c api?
#include <simd/simd.h>
using namespace metal;
struct FrameData
{
float4x4 projectionMatrix;
float4x4 projectionMatrixInv;
float4x4 viewMatrix;
float4x4 viewMatrixInv;
@ncthbrt
ncthbrt / SketchSystems.spec
Last active October 26, 2018 13:15
DeviceTracking
DeviceTracking
NotOnItinerary*
setItinerary -> OnItinerary
updateLocation -> NotOnItinerary
OnItinerary
clearItinerary -> NotOnItinerary
setItinerary -> OnItinerary
OnTime*
arrived at final destination -> NotOnItinerary
irrecoverably late -> FailedItinerary
@ncthbrt
ncthbrt / Easing.cs
Last active September 24, 2018 20:06 — forked from xanathar/Easing.cs
Robert Penner's easing equations for Unity
/**
* Easing
* Animates the value of a float property between two target values using
* Robert Penner's easing equations for interpolation over a specified Duration.
*
* Original Author: Darren David darren-code@lookorfeel.com
*
* Ported to be easily used in Unity by Marco Mastropaolo
*
* Credit/Thanks:
@ncthbrt
ncthbrt / .gitattributes
Last active October 12, 2018 08:43
GIT LFS setup
## Yaml Merge
*.anim merge=unityyamlmerge
*.asset merge=unityyamlmerge
*.controller merge=unityyamlmerge
*.mat merge=unityyamlmerge
*.meta merge=unityyamlmerge
*.physicsMaterial merge=unityyamlmerge
*.physicsMaterial2D merge=unityyamlmerge
*.prefab merge=unityyamlmerge
*.unity merge=unityyamlmerge
@ncthbrt
ncthbrt / dissolve.shader
Created June 20, 2018 15:23 — forked from benloong/UIDissolve.shader
Dissolve shader for Unity
Shader "Unlit/DissolveEffectShader"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_NoiseTex ("Texture", 2D) = "white" {}
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0
_EdgeColour1 ("Edge colour 1", Color) = (1.0, 1.0, 1.0, 1.0)
_EdgeColour2 ("Edge colour 2", Color) = (1.0, 1.0, 1.0, 1.0)
_Level ("Dissolution level", Range (0.0, 1.0)) = 0.1
exception RouteDoesNotMatch
exception MalformedRouteString of string
exception MalformedQueryString of string
exception MalformedQueryParameter of string* string* exn
type 'ty path =
| End: unit path
| Constant: string* 'ty path -> 'ty path
| String: string* 'ty path -> (string* 'ty) path
| Int: string* 'ty path -> (int* 'ty) path
@ncthbrt
ncthbrt / UserSettings.json
Created May 4, 2018 07:57
Vscode config
{
"standard.semistandard": true,
"standard.autoFixOnSave": true,
"editor.minimap.enabled": false,
"editor.formatOnSave": true,
"editor.fontFamily": "Fira Code",
"editor.fontSize": 14,
"editor.tabSize": 2,
"editor.fontLigatures": true,
"terminal.integrated.shell.osx": "/bin/zsh",
@ncthbrt
ncthbrt / Error.log
Created April 14, 2018 19:59
Error Log
Error: Command failed.
Exit code: 1
Command: /usr/local/lib/node_modules/esy/node_modules/@esy-ocaml/ocamlrun/install/bin/ocamlrun
Arguments: /usr/local/lib/node_modules/esy/bin/esyBuildPackage -B -
Directory: /Users/ncthbrt/git/bs-webmachine-experiment
Output:
# esy-build-package: running: 'jbuilder' 'build'
ocamlc src/native/.repromise.objs/repromise.{cmo,cmt} (exit 2)
(cd _build/default && /Users/ncthbrt/.esy/3_________________________________________________________________/i/ocaml-4.6.1-2f0a0fce/bin/ocamlc.opt -w -40 -w +A -g -bin-annot -I src/native/.repromise.objs -I /Users/ncthbrt/.esy/3_________________________________________________________________/i/opam__slash__ctypes-0.13.1-90165226/lib/ctypes -I /Users/ncthbrt/.esy/3_________________________________________________________________/i/opam__slash__integers-0.2.2-f92c4d64/lib/integers -I /Users/ncthbrt/.esy/3_________________________________________________________________/i/opam__slash__ocamlfind-1.7.3--1-cc28f505/lib/bytes -I /Users/ncthbr
@ncthbrt
ncthbrt / restream.rei
Last active February 18, 2018 14:55
Playing around with stream ideas
type stream('a, 'e, 'sourceType);
/*
* A cold stream is one which flow control is handled by the consumer.
* The consumer invokes a function to get the next value.
*/
module Cold: {
type t;
type result('a, 'e) =
| Ok('a)
@ncthbrt
ncthbrt / Authorization.re
Last active January 12, 2018 08:58
Authorization.re
type permission =
| Permission(string, string);
module PermissionComparision = {
type t = permission;
let compare = (Permission(name1, _), Permission(name2, _)) => String.compare(name1, name2);
};
module PermissionSet = Set.Make(PermissionComparision);