Skip to content

Instantly share code, notes, and snippets.

@malikcoskun
malikcoskun / Container.php
Created April 28, 2024 15:51 — forked from daveh/Container.php
Dependency Injection in PHP (code to accompany https://youtu.be/TqMXzEK0nsA)
<?php
class Container
{
private array $registry = [];
public function set(string $name, Closure $value): void
{
$this->registry[$name] = $value;
}
@malikcoskun
malikcoskun / KdTree.cs
Created April 7, 2024 08:01 — forked from ditzel/KdTree.cs
k-d Tree
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Profiling;
public class KdTree<T> : IEnumerable<T>, IEnumerable where T : Component
{
protected KdNode _root;
protected KdNode _last;