Skip to content

Instantly share code, notes, and snippets.

View netpyoung's full-sized avatar
☯️
netpyoung

Eunpyoung Kim netpyoung

☯️
netpyoung
View GitHub Profile
@netpyoung
netpyoung / WorldNormalFromDepthTexture.shader
Created September 9, 2021 13:15 — forked from bgolus/WorldNormalFromDepthTexture.shader
Different methods for getting World Normal from Depth Texture, without any external script dependencies.
Shader "WorldNormalFromDepthTexture"
{
Properties {
[KeywordEnum(3 Tap, 4 Tap, Improved, Accurate)] _ReconstructionMethod ("Normal Reconstruction Method", Float) = 0
}
SubShader
{
Tags { "RenderType"="Transparent" "Queue"="Transparent" }
LOD 100
@netpyoung
netpyoung / maze.clj
Created March 23, 2019 08:58
maze.clj
;; origin
(let [walls (grid 2 2)
paths (reduce (fn [index [a b]]
(merge-with into index {a [b] b [a]}))
{} (map seq walls))
start-loc (rand-nth (keys paths))]
(loop [walls walls
unvisited (disj (set (keys paths)) start-loc)]
(if-let [loc (when-let [s (seq unvisited)] (rand-nth s))]
(let [walk (iterate (comp rand-nth paths) loc)
@netpyoung
netpyoung / example.clj
Created January 30, 2019 00:29
return example
(ns example
(:require
[cloroutine.core :refer [cr]]))
;; ref: https://github.com/leonoel/cloroutine
(def ^:dynamic *tail*)
(defn gen-seq [gen]
(binding [*tail* (lazy-seq (gen-seq gen))]
@netpyoung
netpyoung / StatsBarAttribute.cs
Created March 23, 2018 02:13 — forked from LotteMakesStuff/StatsBarAttribute.cs
StatsBar property drawer for Unity~ Add a [StatsBar] attribute to a property to make it draw a lil bar, really useful for visualizing character stats like Health or Mana.
// NOTE DONT put in an editor folder
using UnityEngine;
public class StatsBarAttribute : PropertyAttribute
{
public string valueMax;
public StatsBarColor color;
public StatsBarAttribute(string valueMax = null, StatsBarColor color = StatsBarColor.Red)
@netpyoung
netpyoung / Two.One.sum.py
Created September 7, 2017 14:51
Two.One.sum.py
# ref : https://stackoverflow.com/questions/5189699/how-to-make-a-class-property
class ClassPropertyDescriptor(object):
def __init__(self, fget, fset=None):
self.fget = fget
self.fset = fset
def __get__(self, obj, klass=None):
if klass is None:
klass = type(obj)
@netpyoung
netpyoung / 20170508_SUMMARY.md
Last active May 30, 2017 03:57
20170508_SUMMARY.md
@netpyoung
netpyoung / test.cs
Last active November 15, 2016 05:15
#region AutoGenerated
public class DataQHello
{
public int A { get; set; }
}
public class DataRHello
{
public int A { get; set; }
}
var comp = SyntaxFactory.CompilationUnit().AddMembers(
SyntaxFactory.NamespaceDeclaration(SyntaxFactory.IdentifierName("ACO"))
.AddMembers(
SyntaxFactory.ClassDeclaration("MainForm")
.AddMembers(
SyntaxFactory.PropertyDeclaration(SyntaxFactory.ParseTypeName("System.Windows.Forms.Timer"), "Ticker")
.AddAccessorListAccessors(
SyntaxFactory.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration).WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.SemicolonToken)),
SyntaxFactory.AccessorDeclaration(SyntaxKind.SetAccessorDeclaration).WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.SemicolonToken))),
SyntaxFactory.MethodDeclaration(SyntaxFactory.ParseTypeName("void"), "Main")
@netpyoung
netpyoung / p4merge4git.md
Created October 6, 2016 16:53 — forked from tony4d/p4merge4git.md
Setup p4merge as a visual diff and merge tool for git
@netpyoung
netpyoung / README.md
Created October 5, 2016 03:18 — forked from jbevain/README.md
pdb2mdb for Visual Studio 2015

The Visual Studio Tools for Unity are able to convert .NET debug symbol files (namely pdb files) to debug symbols files that are understood by Unity's scripting engine (namely .dll.mdb files) when importing both the .dll and the .pdb in the Assets folder.

If you prefer to handle the conversion yourself you need to call a tool named pdb2mdb on the .dll associated with the .pdb:

pdb2mdb MyLibrary.dll

Will produce a MyLibrary.dll.mdb usable on Unity if MyLibrary.pdb is present.