Skip to content

Instantly share code, notes, and snippets.

View zensharp's full-sized avatar
🌿
budding

Zensharp zensharp

🌿
budding
  • United States
View GitHub Profile
@develar
develar / commit-message-format.md
Created September 1, 2017 05:34
Commit Message Format

Commit Message Format

Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:

<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
@sio
sio / git-projects.sh
Created September 7, 2017 17:40
Manage multiple Git projects at once (check status, view logs...)
#!/bin/bash
set -e
#
# Execute the same git command in all project directories.
#
# Extra command line arguments are passed to git.
# If no arguments are specified, `git status` is assumed.
#
# File `projects.txt` has to contain paths to all project
@nicoplv
nicoplv / 0-UnityScriptTemplates.info
Last active May 10, 2024 16:41
List of C# Script Templates for Unity 3D
List of C# Script Templates for Unity 3D:
81-C#__Behavior-NewBehaviour.cs.txt
81-C#__BehaviorListed-NewBehaviourListed.cs.txt
81-C#__Class-NewClass.cs.txt
81-C#__Interface-NewInterface.cs.txt
81-C#__ScriptableObject-NewScriptableObject.cs.txt
@phi-lira
phi-lira / UniversalPipelineTemplateShader.shader
Last active July 18, 2026 13:37
Template shader to use as guide to create Universal Pipeline ready shaders. This shader works with Universal Render Pipeline 7.1.x and above.
// When creating shaders for Universal Render Pipeline you can you the ShaderGraph which is super AWESOME!
// However, if you want to author shaders in shading language you can use this teamplate as a base.
// Please note, this shader does not necessarily match perfomance of the built-in URP Lit shader.
// This shader works with URP 7.1.x and above
Shader "Universal Render Pipeline/Custom/Physically Based Example"
{
Properties
{
// Specular vs Metallic workflow
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0
@claytonrcarter
claytonrcarter / README.md
Last active February 24, 2026 16:16
Bash script to check GitLab pipeline status

A super simple bash script to check the status of a GitLab CI pipeline.

$ git push
...
$ git pipeline-status
Status of last pipeline for user/project on gitlab/master:
"pending"
...
$ git pipeline-status
@Split82
Split82 / UnityShadersCheatSheet.shader
Created April 17, 2018 10:07
Unity Shaders Cheat Sheet
Shader "Name" {
Properties {
_Name ("display name", Range (min, max)) = number
_Name ("display name", Float) = number
_Name ("display name", Int) = number
_Name ("display name", Color) = (number,number,number,number)
_Name ("display name", Vector) = (number,number,number,number)
@fuzzblob
fuzzblob / EditorUtil.Waveform.cs
Created October 29, 2018 22:19
Unity Waveform UI with customizable resolution
/*
// UI inspector example implementation
Rect waveformRect = GUILayoutUtility.GetRect(waveformSize.x, waveformSize.y, GUIStyle.none);
EditorUtil.Waveform(waveformRect, clip, waveformSize);
float playMarker = 0f; // replace with a 0-1 seek position
if (playMarker >= 0f) {
Rect progressRect = new Rect(waveformRect);
float width = progressRect.width * playMarker;
progressRect.width = Mathf.Clamp(width, 6, width);
@sergiobd
sergiobd / Skybox6-ArbitraryRotation
Created November 10, 2018 17:57
Unity skybox 6-sided with arbitrary rotation axis
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
// Edited from Unity built-in, copied rotation function from here: http://www.neilmendoza.com/glsl-rotation-about-an-arbitrary-axis/
Shader "Skybox/6 Sided - Arbitrary Rotation" {
Properties {
_Tint ("Tint Color", Color) = (.5, .5, .5, .5)
[Gamma] _Exposure ("Exposure", Range(0, 8)) = 1.0
_Rotation ("Rotation", Range(0, 360)) = 0
_RotationAxis("Rotation axis", Vector) = (0, 1, 0)
[NoScaleOffset] _FrontTex ("Front [+Z] (HDR)", 2D) = "grey" {}
[NoScaleOffset] _BackTex ("Back [-Z] (HDR)", 2D) = "grey" {}
@AArnott
AArnott / Cancellation.cs
Last active December 15, 2025 22:18
Graceful console app cancellation on Ctrl+C
class Program
{
static async Task Main(string[] args)
{
// Add this to your C# console app's Main method to give yourself
// a CancellationToken that is canceled when the user hits Ctrl+C.
var cts = new CancellationTokenSource();
Console.CancelKeyPress += (s, e) =>
{
Console.WriteLine("Canceling...");
@sinbad
sinbad / License.txt
Last active March 14, 2025 01:22
Unity 2D Line Segment Intersection
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit