Skip to content

Instantly share code, notes, and snippets.

View ncthbrt's full-sized avatar
🧶
Coding

Natalie Cuthbert ncthbrt

🧶
Coding
View GitHub Profile
using UnityEngine;
using UnityEditor;
[CustomPropertyDrawer(typeof(HSVColour))]
public class HSVColourDrawer : PropertyDrawer
{
public override void OnGUI(Rect totalRect, SerializedProperty property, GUIContent label)
{
using UnityEngine;
using System;
using UnityEngine.Assertions;
/*
* Adapted from code by Jonathan Czeck (aarku)
*/
/// <summary>
/// A colour represented by hue, saturation and value values.
@ncthbrt
ncthbrt / installv1.gradle
Last active January 19, 2016 18:22
Upload to gradle
apply plugin: 'maven'
group = publishedGroupId // Maven Group ID for the artifact
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'jar'
apply plugin: 'com.jfrog.bintray'
version = libraryVersion
// Bintray
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")

WhereIsMyTransport Live Services - CaptainHook

Overview

Introduction

CaptainHook is a service which allows you to subscribe to events using a simple REST API. When an event occurs, it is sent to event subscribers as a JSON formatted POST request.

Usage

@ncthbrt
ncthbrt / HomeController.cs
Last active November 16, 2016 14:30
Factorial Toy
using System;
using System.Numerics;
using System.Threading;
using System.Threading.Tasks;
using Akka.Actor;
using Microsoft.AspNetCore.Mvc;
namespace ClassicTestAkkaApp
{
public class NumberRequest

Keybase proof

I hereby claim:

  • I am ncthbrt on github.
  • I am ncthbrt (https://keybase.io/ncthbrt) on keybase.
  • I have a public key ASAhfMvlAHjsw1kXDVddI4zgWCiR0sfW9UzdYuD1jVqvRAo

To claim this, I am signing this object:

@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);
@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 / 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