Skip to content

Instantly share code, notes, and snippets.

@JohannesMP
JohannesMP / EnableDiscordDevExperiments.md
Last active October 6, 2024 18:32 — forked from ExordiumX/betaenabler.js
Enabling Discord Dev Experiments on Discord for Windows (2022-02)

Enable Dev Experiments in Discord for Windows

image

This guide shows how to enable dev mode for the Discord desktop application running on Windows (as of February 2022).

This can be used to view beta experiments to try features currently in development that are included but hidden by default in Discord release builds.


@JohannesMP
JohannesMP / README.md
Last active December 12, 2021 23:29
Improving Photoshop Wacom Tablet Performance in Windows 10

Here are changes you can make that can greatly improve the responsiveness of Wacom Tablets on Windows 10.

NOTE: This guide was written for Photoshop CC (21.2.1) but most changes should apply to all versions of Photoshop.


Photoshop Settings Changes

These are changes in Photoshop itself. To be sure, restart Photoshop after applying these.

@JohannesMP
JohannesMP / EventProxyContainer.cs
Last active April 15, 2020 12:03
Proxying an Action<T> event as Action<object> and Action in C#
using System;
using System.Collections.Generic;
public struct EventHandlerProxy<T>
{
private struct HandlerProxy
{
public Action<T> proxy;
public int count;
}
@JohannesMP
JohannesMP / EditorContextMenuCopySerialized.cs
Last active July 17, 2023 11:10
Unity Editor Context Menu Extensions
using UnityEngine;
using UnityEditor;
namespace UnityEditorExtensions
{
public static class EditorContextMenuCopySerialized
{
static SerializedObject sourceValues;
static System.Type sourceType;
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)
@JohannesMP
JohannesMP / UIBlur.shader
Last active October 26, 2024 07:16
UI.Image Blur Shader with layering and masking support
Shader "Custom/UIBlur"
{
Properties
{
[Toggle(IS_BLUR_ALPHA_MASKED)] _IsAlphaMasked("Image Alpha Masks Blur", Float) = 1
[Toggle(IS_SPRITE_VISIBLE)] _IsSpriteVisible("Show Image", Float) = 1
// Internally enforced by MAX_RADIUS
_Radius("Blur Radius", Range(0, 64)) = 1
@JohannesMP
JohannesMP / LICENSE
Last active September 29, 2024 15:28
[Unity3D] A Reliable, user-friendly way to reference SceneAssets by script.
/*******************************************************************************
* Don't Be a Jerk: The Open Source Software License.
* Adapted from: https://github.com/evantahler/Dont-be-a-Jerk
*******************************************************************************
* _I_ am the software author - JohannesMP on Github.
* _You_ are the user of this software. You might be a _we_, and that's OK!
*
* This is free, open source software. I will never charge you to use,
* license, or obtain this software. Doing so would make me a jerk.
*
@JohannesMP
JohannesMP / InspectorButtonsTest.cs
Created July 31, 2018 05:33 — forked from LotteMakesStuff/InspectorButtonsTest.cs
Code running pack! two property drawing scripts that make it super easy to trigger code via buttons in the inspector, and get feedback! [TestButton] draws you little buttons that call a method on your MonoBehaviour, and [ProgressBar] give you a great way to show feedback from long running methods. These are *super* helpful for things like proced…
using UnityEngine;
using System.Collections;
public class InspectorButtonsTest : MonoBehaviour
{
[TestButton("Generate world", "DoProcGen", isActiveInEditor = false)]
[TestButton("Clear world", "ClearWorld", 2, isActiveInEditor = false)]
[ProgressBar(hideWhenZero = true, label = "procGenFeedback")]
public float procgenProgress = -1;
@JohannesMP
JohannesMP / EditorCoroutineRunner.cs
Created July 31, 2018 05:32 — forked from LotteMakesStuff/EditorCoroutineRunner.cs
Run stuff in the editor with all the convenience of co-routines! Add a status UI super easily to see readouts what your long running code is actually doing! nice~ There is a short API demo at the top of the class. This is a prefect companion for my inspector buttons https://gist.github.com/LotteMakesStuff/dd785ff49b2a5048bb60333a6a125187
using UnityEngine;
using UnityEditor;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
public class EditorCoroutineRunner
{
[MenuItem("Window/Lotte's Coroutine Runner: Demo")]
@JohannesMP
JohannesMP / EditorExtensionMethods.cs
Created July 31, 2018 05:24 — forked from LotteMakesStuff/EditorExtensionMethods.cs
A reimplementation of the logic in the Unity Editor that draws an inspector for a component. We can use this to learn how unity actually draws the inspector. for more info see https://www.patreon.com/posts/16724128
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.Reflection;
public static class EditorExtensionMethods
{
// Public reimplmentation of extention methods and helpers that are marked internal in UnityEditor.dll