Skip to content

Instantly share code, notes, and snippets.

View instance-id's full-sized avatar

instance.id instance-id

View GitHub Profile
@instance-id
instance-id / DIContainer.cs
Last active February 15, 2024 04:59
OneShot - Dependency Injection: Example Registration and Injection Handler
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using instance.id.DataTypes;
using instance.id.Logging;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityObject = UnityEngine.Object;
@instance-id
instance-id / EditorCameraZoomWithScrollWheel.cs
Created May 3, 2020 21:32
Fixes Unity editor viewport mousewheel
#if UNITY_2019_1_OR_NEWER
using UnityEditor;
using UnityEngine;
[InitializeOnLoad]
public class EditorCameraZoomWithScrollWheel
{
private const float CAMERA_SPEED = -0.25f;
private static bool rmbDown = false;
@instance-id
instance-id / CreateAddressableWithShortName.cs
Last active January 23, 2024 15:32
An example of creating an Addressable GameObject from a prefab with a simplified name
// ------------------------------------------------------------------------------------ AddressInfo
// --- AddressInfo --------------------------------------------------------------------------------
public static class AddressInfo
{
public static string prefabGroup = "Prefabs";
public static string prefabLabel = "Prefab";
}
// ------------------------------------------------------------------------------ AddressableHelper
// --- AddressableHelper --------------------------------------------------------------------------
@instance-id
instance-id / hue_tap_dial_nodered.js
Created December 26, 2023 08:42
A script for a node-red function node to handle Hue Tap Dial rotation and button presses.
var action = msg.payload.action;
var direction = msg.payload.action_direction;
var step = msg.payload.action_time;
if (action == null || action == undefined || action == "") {
return;
}
var dialDirections = ["right", "left"];
var buttonNumbers = ["1", "2", "3", "4"];
@instance-id
instance-id / zmk_shell_help_request.md
Last active November 21, 2023 16:43
Request for assistance applying new feature branch to Kinesis 360Advantage firmware.

I attempted to implement this myself, but I think I am missing a step somewhere. If anyone is be able to spot something I might have missed, please do let me know, as I am was familiar with ZMK prior to this attempt.

I use a Kinesis 360Advantage Pro, as such I am using firmware from them.

Steps taken:

  1. Forked the Kinesis repo: Original: https://github.com/KinesisCorporation/Adv360-Pro-ZMK My fork: https://github.com/instance-id/Adv360-Pro-ZMK
  2. Checked the west.yml file from the above repo to locate the base firmware and forked it: Original: https://github.com/ReFil/zmk My fork: https://github.com/instance-id/zmk
  3. Made the same modifications from PR: zmkfirmware/zmk#1318 in my forked repo under the appropriate branch: https://github.com/instance-id/zmk/commit/5b1a6afe5d19afa7ee9bc82e12316f8311060e54
  4. Updated the west.yml in my forked firware building repo to point to my forked firmware source repo and branch. https://github.com/instance-id/Adv360-Pro-ZMK/blob/V2.0/config/west.
@instance-id
instance-id / shell.csx
Created November 14, 2023 16:55
Shell call example
#!/usr/bin/env dotnet-script
#r "System.Console"
#r "System.Diagnostics.Process"
using System;
using System.Diagnostics;
public interface IShell
{
@instance-id
instance-id / unity_discussion.discourse.js
Created June 16, 2023 21:32
Unity Discussions Wide Screen Userscript - ViolentMonkey - (Newer Discourse board)
// ==UserScript==
// @name Unity Discussion(Discourse) WideScreen - unity.com
// @namespace Violentmonkey Scripts
// @match *://discussions.unity.com/*
// @grant none
// @version 0.1
// @author instance.id
// @description 6/16/2023, 4:17:24 PM
// ==/UserScript==
@instance-id
instance-id / UnityForumBoardSearchHelper.js
Last active June 15, 2023 16:51 — forked from unitycoder/UnityForumBoardSearchHelper.js
Unity Forum Search : AutoSelect current board item inside Search select list (based on referrer url)
// ==UserScript==
// @name Unity Forum Search : AutoSelect current board item inside Search select list (based on referrer url)
// @namespace https://unitycoder.com
// @version 1
// @include https://forum.unity.com/search/?type=post
// @grant none
// ==/UserScript==
// more info https://unitycoder.com/blog/2021/05/26/unity-forums-auto-select-current-subforum-in-search-greasemonkey-script/
// get referring board url
@instance-id
instance-id / config.cyon
Created March 13, 2023 18:33
Converting a Window size cycling acript from PowerShell (linux) to Cyber (scripting language built with Zig)
--| Data Store -----------------------------
--|-----------------------------------------
{
sizes : [
{ x:2790, y:860, w:820, h:468 },
{ x:2678, y:797, w:1044, h:594 },
{ x:2590, y:748, w:1220, h:693 },
{ x:2390, y:635, w:1620, h:918 },
{ x:2060, y:577, w:2280, h:1034 }
],
@instance-id
instance-id / firenvim_gist.user.js
Created March 5, 2023 00:36
Disables CodeMirror editor in Gists so you can use FireNvim
// ==UserScript==
// @name Github Gist - Hide CodeMirror for Firenvim
// @namespace Violentmonkey Scripts
// @match https://gist.github.com/*
// @run-at document-start
// @version 1.0
// @author instance.id
// @description Hide CodeMirror for Firenvim
// ==/UserScript==