Skip to content

Instantly share code, notes, and snippets.

View Borod4r's full-sized avatar

Ivan Gadzhega Borod4r

View GitHub Profile
@Borod4r
Borod4r / .gitignore
Created February 4, 2024 15:30
.gitignore for Unity projects
# ===================================================
# Unity folders
# ===================================================
/[Bb]uild/
/[Bb]uilds/
/[Ll]ibrary/
/[Ll]ogs/
/[Mm]emoryCaptures/
/[Oo]bj/
@Borod4r
Borod4r / RepositoryInformation.cs
Created November 21, 2019 09:24
Git repo Info from C# script
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
class RepositoryInformation : IDisposable
{
public static RepositoryInformation GetRepositoryInformationForPath(string path, string gitPath = null)
{
var repositoryInformation = new RepositoryInformation(path, gitPath);
@Borod4r
Borod4r / Support_for_Single_Pass_Instanced_Rendering.patch
Created July 18, 2019 12:42
Farland Skies - Low Poly : Support for Single Pass Instanced Rendering
Index: Assets/Farland Skies/Low Poly/Shaders/LowPolySkybox.shader
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- Assets/Farland Skies/Low Poly/Shaders/LowPolySkybox.shader (revision f7d4f5a635024a416281d68bf3f41fae11268f8d)
+++ Assets/Farland Skies/Low Poly/Shaders/LowPolySkybox.shader (date 1563453196180)
@@ -105,6 +105,14 @@
// Structs
// -----------------------------------------
^((([a-z]|\\d|[!#\\$%&\'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&\'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0
@Borod4r
Borod4r / .gitignore
Created October 4, 2018 18:57
Gitignore for Unity projects
# ===================================================
# Unity folders
# ===================================================
/[Bb]uild/
/[Bb]uilds/
/[Ll]ibrary/
/[Ll]ogs/
/[Oo]bj/
/[Rr]ecords/
@Borod4r
Borod4r / UnityShaders.xml
Last active October 25, 2021 13:26
Basic syntax highlight for Unity ShaderLab code in Project Rider
<!--
Basic syntax highlight for Unity ShaderLab code in Project Rider.
v1.0
Download this file and put it into your "filetypes" folder.
Windows Vista, 7, 8, 10:
<SYSTEM DRIVE>\Users\<USER ACCOUNT NAME>\.Rider10\config\filetypes
Mac OS X:
@Borod4r
Borod4r / BetterDefines.cs
Created March 4, 2016 15:53
Better Defines for Unity3D
using System.Collections.Generic;
using UnityEditor;
namespace Borodar.YesNoMath.Editor
{
[InitializeOnLoad]
public class BetterDefines
{
static BetterDefines()
@Borod4r
Borod4r / FBSucks.cs
Last active March 11, 2022 02:53
Share image with text on android (works with FB)
private static void ShareImageWithTextOnAndroid(string message, string imageFilePath)
{
AndroidJavaClass intentClass = new AndroidJavaClass("android.content.Intent");
AndroidJavaObject intentObject = new AndroidJavaObject("android.content.Intent");
intentObject.Call<AndroidJavaObject>("setAction", intentClass.GetStatic<string>("ACTION_SEND"));
AndroidJavaClass uriClass = new AndroidJavaClass("android.net.Uri");
AndroidJavaObject uriObject = uriClass.CallStatic<AndroidJavaObject>("parse", "file://" + imageFilePath);
intentObject.Call<AndroidJavaObject>("putExtra", intentClass.GetStatic<string>("EXTRA_STREAM"), uriObject);
intentObject.Call<AndroidJavaObject>("putExtra", intentClass.GetStatic<string>("EXTRA_TEXT"), message);
@Borod4r
Borod4r / PreloadSigningAlias.cs
Created February 3, 2016 15:24
Preload signing key settings for Android in Unity3d
using UnityEditor;
namespace Borodar.Editor
{
[InitializeOnLoad]
public class PreloadSigningAlias
{
static PreloadSigningAlias()
{
$(".list-header-name:contains(Backlog)").parents(".js-list-content").css("background", "#99ddff");
$(".list-header-name:contains(In Progress)").parents(".js-list-content").css("background", "#eef0b2");
$(".list-header-name:contains(Done)").parents(".js-list-content").css("background", "#d4ffbf");
$(".list-header-name:contains(Cancelled)").parents(".js-list-content").css("background", "#f0d3b2");