This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Advent of code 2020, Day 5 | |
import fs from 'fs'; | |
import assert from 'assert'; | |
function convertStringToSeatId(seatCode: string): number { | |
return (Array.prototype.map.call(seatCode, (c: string): number => { | |
switch (c) { | |
case 'F': | |
case 'L': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Enumeration of valid commands. | |
*/ | |
export type Command = 'RegisterGame' | 'GameToController' | 'ControllerToGame'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using System.Runtime.CompilerServices; | |
using UnityEngine.Assertions; | |
using UnityEngine; | |
namespace UGS.unityutils { | |
/// <summary> | |
/// Log when collisions and triggers are entered and exited. | |
/// </summary> | |
public sealed class CollisionHelper : MonoBehaviour { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
using System; | |
using UnityEngine; | |
using UnityEngine.Assertions; | |
using UnityEngine.Events; | |
namespace UGS.unityutils { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See https://unreasonablygoodsoftware.wordpress.com/2020/03/05/json-net-custom-dictionary-serialization/ | |
using System; | |
using System.Collections.Generic; | |
using JetBrains.Annotations; | |
using Newtonsoft.Json; | |
using NUnit.Framework; | |
using UnityEngine.Scripting; | |
namespace packageNameRemoved { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Text; | |
using Cinemachine; | |
using UGS.unityutils.attributes; | |
using UnityEngine; | |
namespace UGS.snwscf.camera { | |
public sealed class CameraDebugger : MonoBehaviour { | |
#region serialized | |
[SerializeField, NonNull] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GraphViz file for Unity3D ECS including new Unity.Physics and showing spaces for its various callback groups. | |
# Render with: | |
# dot -Tpng ECS-Unity.Physics.dot -o ECS-Unity.Physics.png | |
# | |
# License: CC-SA (BY appreciated but not required) | |
# Original version: @Arakade Rupert Key, 2019/06/07 | |
digraph "Unity.Physics" { | |
label="ECS + Unity.Physics jobs and phases" | |
compound=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Unity.Burst; | |
using Unity.Entities; | |
using Unity.Physics.Authoring; | |
using UnityEngine; | |
using UnityEngine.Assertions; | |
namespace UGS { | |
/// <summary> | |
/// Tag component for causing things to stick. | |
/// Could I also do this with a Physics.Material "Custom Flags" or "Collision Filter" ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getSteamSpyAppDetails() { | |
// Get the appId from spreadsheet for now: | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var appId = sheet.getDataRange().getCell(1, 1).getValue(); | |
// Build query | |
var url = 'https://steamspy.com/api.php' | |
+ '?request=appdetails&appid=' + encodeURIComponent(appId); | |
Logger.log("Sending: \"%s\"", url); |
NewerOlder