Skip to content

Instantly share code, notes, and snippets.

@hybridherbst
hybridherbst / Fixup.cs
Last active August 19, 2019 13:31
Quill Fixup. Make sure to adjust the name filter in FixupPostprocessor for your pipeline BEFORE you drop these into an Editor folder.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
namespace pfc.WeirdQuillFixup
{
public static class Fixup
{
public static void FixMeshInPlace(Mesh mesh)
@hybridherbst
hybridherbst / Custom_UIAfterPP.shader
Created August 30, 2019 09:26
Unity HDRP custom UI shader version that works for both text + images for me. Random trial + error on the blend mode. Not sure which other things are broken now...
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
Shader "Custom/UI-Default-AfterPP (Images)"// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
{
Properties
{
[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
_Color("Tint", Color) = (1,1,1,1)
_StencilComp("Stencil Comparison", Float) = 8
@hybridherbst
hybridherbst / Electron app decompiling
Created April 12, 2020 23:17 — forked from yassineaboukir/Electron app decompiling
Obtain the source code of Electron applications
# Open terminal and install asar node module globally
$ npm install -g asar
# Go into the app’s directory, in our case it’s Slack
$ cd /Applications/Slack.app/Contents/Resources
# Create a directory to paste the content of app

Keybase proof

I hereby claim:

  • I am hybridherbst on github.
  • I am fherbst (https://keybase.io/fherbst) on keybase.
  • I have a public key ASBcXOr6y9MoixUoBn700ot44MYsVODKHmevksm67nZSbAo

To claim this, I am signing this object:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public static class LogEmojis
{
[MenuItem("needle/Log interesting chars from Inter")]
static void LogInterestingCharsToConsole()
{
@hybridherbst
hybridherbst / DragAndDropEditorWindow.cs
Created October 10, 2020 21:22 — forked from rutcreate/DragAndDropEditorWindow.cs
How to use DragAndDrop function in Unity3D custom editor. This is just handle when user drag anything outside to THIS EditorWindow only.
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
public class DragAndDropEditorWindow : EditorWindow
{
[MenuItem("Window/Drag And Drop")]
public static void Open()
{
@hybridherbst
hybridherbst / SetThreadCount.cs
Created January 15, 2021 15:56
Set the number of concurrent compiler threads for Unity3D
using System;
using System.Reflection;
using UnityEditor;
using UnityEngine;
public static class SetThreadCount
{
[InitializeOnLoadMethod]
static void Init()
{
@hybridherbst
hybridherbst / ChangeHideFlags.cs
Created February 9, 2021 15:55
Show all objects - disable HideFlags
using UnityEditor;
using UnityEngine;
using UnityEngine.SceneManagement;
public static class ChangeHideflags
{
[MenuItem("Tools/Show All for Selection")]
static void ShowAllChilds()
{
var t = Selection.activeTransform;
@hybridherbst
hybridherbst / RuntimeInitializeOnLoad - Event Order.cs
Created March 8, 2021 15:04
[RuntimeInitializeOnLoad] Event Order
static Lifecycle() => Debug.Log(Prefix + "Static Constructor");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] static void Subs() => Debug.Log(Prefix + "Subsystem Registration");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterAssembliesLoaded)] static void AfterAsm() => Debug.Log(Prefix + "AfterAssembliesLoaded");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)] static void BeforeSlash() => Debug.Log(Prefix + "Before Splash");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] static void BeforeScene() => Debug.Log(Prefix + "BeforeScene");
private void Awake() => Debug.Log(Prefix + "Awake");
private void OnEnable() => Debug.Log(Prefix + "OnEnable");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)] static void AfterScene() => Debug.Log(Prefix + "AfterSceneLoad");
[RuntimeInitializeOnLoadMethod] static void DefaultLog() => Debug.Log(Prefix + "RuntimeInit Default");
void Start() => Debug
@hybridherbst
hybridherbst / utf8-stress-test.txt
Last active December 3, 2021 23:56
UTF8 Stress Test ₧₪№↨בּשּׂ؟⇶♚❂☈☃ ҉ↂ✂❧☠℥
Probably most complete version:
₧₪№↨בּשּׂ؟⇶♚❂☈☃ ҉ↂ✂❧☠℥
Copied with Windows Clipboard from Discord Status to Gist
₧₪№↨בּשּׂ؟⇶♚❂☈ ҉ↂ❧℥
Copied with Android Clipboard from Hangouts Status to Gist
₧₪№↨בּשּׂ؟⇶♚❂☈☃ ҉ↂ✂❧☠℥‎‎‎‎‎‎‎‎‎‎