Skip to content

Instantly share code, notes, and snippets.

@ITR13
ITR13 / SceneViewObjectPickerContextWindow.cs
Last active March 5, 2026 09:41 — forked from yasirkula/SceneViewObjectPickerContextWindow.cs
[FORK] Select the object under the cursor via right click in Unity's Scene window
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using UnityEditor;
using UnityEngine;
using UnityEngine.Pool;
using UnityEngine.UI;
public class SceneViewObjectPickerContextWindow : EditorWindow
@ITR13
ITR13 / impure-vs-pure.cs
Last active February 7, 2025 15:41
Impure vs Pure function example.
class Foo {
private int _someVariable, _someOtherVariable;
void Update() {
DoSomething(); // No way of knowing what this mutates without reading it :(
// The set variables are only used in the same flow
Log(_someVariable, _someOtherVariable);
}
private void Inner() {
@ITR13
ITR13 / buckshot-bruteforce.nim
Last active February 20, 2024 18:29
Finds the optimal move for the player to use against the original dealer AI
import std/tables
import std/hashes
const MaxDepth = 1
type
Item = enum
None, Magnify, Cigarette, Beer, Handcuff, Handsaw
ShootPerson = enum