Skip to content

Instantly share code, notes, and snippets.

@craigbeck
craigbeck / introspection-query.graphql
Created April 6, 2016 20:20
Introspection query for GraphQL
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {
@svermeulen
svermeulen / MultiSceneSetup.cs
Created October 23, 2016 17:32
Simple editor script to save and load multi-scene setups within Unity3D
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityEditor.SceneManagement;
using UnityEditor;
using System.Collections;
using System.Linq;
public class MultiSceneSetup : ScriptableObject
{
@gunar
gunar / await-to-js-no-throw.js
Last active January 5, 2021 00:26
Async Control Flow without Exceptions nor Monads
'use strict'
const toUpper = async string => {
if (string === 'invalid') return [Error('Invalid input')]
return [null, string.toUpperCase()]
}
const errorHandler = () => { console.log('There has been an error. I\'ll handle it.') }
const print = console.log
const foo = async input => {
@neoRiley
neoRiley / AspectRatioButton.cs
Last active June 10, 2024 17:38
Extends VisualElement and provides the ability to maintain an aspect ratio as well as add a Label who's font size is scaled with the AspectRatioPanel
using System;
using System.Collections.Generic;
using UniRx;
using UnityEngine;
using UnityEngine.UIElements;
namespace N30R1L37
{
[UnityEngine.Scripting.Preserve]