Skip to content

Instantly share code, notes, and snippets.

View cdiggins's full-sized avatar
🐉
Eliminating Lines of Code

Christopher Diggins cdiggins

🐉
Eliminating Lines of Code
View GitHub Profile
Shader "Pristine Grid"
{
Properties
{
[KeywordEnum(MeshUV, WorldX, WorldY, WorldZ)] _UVMode ("UV Mode", Float) = 2.0
_GridScale ("Grid Scale", Float) = 1.0
_LineWidthX ("Line Width X", Range(0,1.0)) = 0.01
_LineWidthY ("Line Width Y", Range(0,1.0)) = 0.01
@praeclarum
praeclarum / Database.fs
Created February 16, 2022 17:11
An immutable database with reference entities, cascading deletes, undo buffers, serialization, and reactive variables
namespace Neural
type Id = System.String
type Id<'T> =
| Id of Id
override this.ToString () = match this with Id id -> id
type IEntity =
abstract References : Id seq with get
abstract DeleteReference : Id -> IEntity option
@MaximRouiller
MaximRouiller / Program.cs
Last active March 27, 2024 22:45
GitHub API access with Personal Access Token using C# HttpClient and .NET Core
public class Program
{
public static void Main(string[] args)
{
Task.WaitAll(ExecuteAsync());
Console.ReadLine();
}
public static async Task ExecuteAsync()
{
@chrisheckey
chrisheckey / build_openvdb.cmd
Last active September 15, 2018 02:26
Build OpenVDB Maya Plugin
@echo off
rem works with https://github.com/chrisheckey/openvdb/tree/win_build
call :DATETIME
echo Started Building OpenVDB on %_DATETIME%
title OpenVDB Build %_DATETIME%
setlocal
:: Clone
@kodekracker
kodekracker / json_encoder.py
Last active November 20, 2018 12:36
A Custom SqlAlchemy JSON encoder class to encode models instances in json format which supports major object instances useful in developing api's in flask.
# To use this custom JsonEncoder class, you have to create a __json__() named
# function in each sqlalchemy model class, which basically return a list of model
# class attributes to be parsed, otherwise all attributes are processed present
# in `dir(class_name)`.
#
# Model Example:
# class User(db.Model):
# id = db.Column(db.Integer, primary_key=True)
# name = db.Column(db.String(100))
# email = db.Column(db.String(100))