Skip to content

Instantly share code, notes, and snippets.

@BanksySan
BanksySan / a-change-of-heart.md
Last active September 26, 2023 12:54
Hard to find poems

Chaos

By: Alexis Korner

A Change of heart,
A change of plan,
Must surley be the way.

Get off the ground,
@BanksySan
BanksySan / training-resources.md
Last active August 19, 2022 10:50
Training Resources

Training Resources

General

  1. PluralSight
  2. Front End Masters
  3. WhizzLabs
@BanksySan
BanksySan / datatype-sizes.cpp
Last active December 15, 2021 22:17
Arduino/ATMega328 Snippets
Serial.println("SCHAR_MIN = " + String(SCHAR_MIN, DEC) + ", " + String(SCHAR_MIN, HEX)); // minimum value for a signed char
Serial.println("SCHAR_MAX = " + String(SCHAR_MAX, DEC) + ", " + String(SCHAR_MAX, HEX)); // maximum value for a signed char
Serial.println("UCHAR_MAX = " + String(UCHAR_MAX, DEC) + ", " + String(UCHAR_MAX, HEX)); // maximum value for an unsigned char
Serial.println("CHAR_MIN = " + String(CHAR_MIN, DEC) + ", " + String(CHAR_MIN, HEX)); // minimum value for a char
Serial.println("CHAR_MAX = " + String(CHAR_MAX, DEC) + ", " + String(CHAR_MAX, HEX)); // maximum value for a char
Serial.println("SHRT_MIN = " + String(SHRT_MIN, DEC) + ", " + String(SHRT_MIN, HEX)); // minimum value for a short
Serial.println("SHRT_MAX = " + String(SHRT_MAX, DEC) + ", " + String(SHRT_MAX, HEX)); // maximum value for a short
Serial.println("USHRT_MAX = " + String(USHRT_MAX, DEC) + ", " + Str
@BanksySan
BanksySan / Regex.md
Last active August 15, 2021 13:40
Regex 101

Regular Expressions

Introduction

The terms regular expression, regex and regexp are 100% synonymous. I call them regexes.

Gotcha: The \ character is both an escape and an unescape character depending on the context.

Tools

  1. https://regex101.com/
@BanksySan
BanksySan / ColorSetter.cs
Created May 5, 2021 20:47
Unity Colour per Instance.
[RequireComponent(typeof(Renderer))]
public class ColorSetter : MonoBehaviour
{
private const string PROPERTY_ID = "Target Color";
private Renderer _renderer;
private void Start()
{
_renderer = GetComponent<Renderer>();
}
@BanksySan
BanksySan / ThreadCancelledExceptionTests.cs
Created November 18, 2020 15:43
Examples of *CancelledException causes.
using System;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
namespace Junk.TaskCanceled.Tests
{
[SuppressMessage("ReSharper", "MethodSupportsCancellation", Justification = "That's the point of the test.")]
public class Tests
@BanksySan
BanksySan / TargetGroupTransition.cs
Last active September 21, 2020 11:42
Enabling animation of Cinemachine target group weights.
using Cinemachine;
using UnityEngine;
[ExecuteAlways]
[RequireComponent(typeof(CinemachineTargetGroup))]
public class TargetGroupTransition : MonoBehaviour
{
[Range(0, 1)] public float Blend = 1;
private CinemachineTargetGroup _targetGroup;
@BanksySan
BanksySan / TargetGroupBlender.cs
Last active September 20, 2020 17:57
Unity Target Group weight change
/* Blend to camera focus from the character to the firefly.
* No effect on actual target group weighting.
*/
using System.Collections;
using Cinemachine;
using UnityEngine;
namespace Project
{
[RequireComponent(typeof(CinemachineTargetGroup))]
@BanksySan
BanksySan / New Environment.json
Last active May 25, 2020 07:26
Mockoon New Environment + SSL
{
"source": "mockoon:1.8.0",
"data": [
{
"type": "environment",
"item": {
"uuid": "",
"lastMigration": 10,
"name": "New environment",
"endpointPrefix": "",
@BanksySan
BanksySan / .gitattributes
Last active February 19, 2021 19:27
Unity Git Configuration
# 3D models
*.3dm filter=lfs diff=lfs merge=lfs -text
*.3ds filter=lfs diff=lfs merge=lfs -text
*.blend filter=lfs diff=lfs merge=lfs -text
*.c4d filter=lfs diff=lfs merge=lfs -text
*.collada filter=lfs diff=lfs merge=lfs -text
*.dae filter=lfs diff=lfs merge=lfs -text
*.dxf filter=lfs diff=lfs merge=lfs -text
*.fbx filter=lfs diff=lfs merge=lfs -text