Skip to content

Instantly share code, notes, and snippets.

View SH42913's full-sized avatar

Farley Drunk SH42913

View GitHub Profile
@NN---
NN--- / .editorconfig
Last active February 21, 2023 15:03 — forked from cezarypiatek/.editorconfig
This snippet set severity level to error for different rules related to the reference nullability
[*.cs]
# Dereference of a possibly null reference.
dotnet_diagnostic.CS8602.severity = error
# Object or collection initializer implicitly dereferences possibly null member.
dotnet_diagnostic.CS8670.severity = error
# Possible null reference assignment.
dotnet_diagnostic.CS8601.severity = error
# Unboxing a possibly null value.
dotnet_diagnostic.CS8605.severity = error
# Possible null reference return.
@ditzel
ditzel / KdTree.cs
Last active June 14, 2024 19:13
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;
~r~ = Red
~b~ = Blue
~g~ = Green
~y~ = Yellow
~p~ = Purple
~o~ = Orange
~c~ = Grey?
~m~ = Darker Grey
~u~ = Black
~n~ = New Line
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule