Skip to content

Instantly share code, notes, and snippets.

View digiwombat's full-sized avatar
🚽

Randall Fitzgerald digiwombat

🚽
View GitHub Profile

Keybase proof

I hereby claim:

  • I am digiwombat on github.
  • I am digiwombat (https://keybase.io/digiwombat) on keybase.
  • I have a public key ASAJhiu0E-CNntQKu2KulgnNLNJ9jHVwWvkGOtzlKDSIfwo

To claim this, I am signing this object:

twitch-videoad.js application/javascript
(function() {
if ( /(^|\.)twitch\.tv$/.test(document.location.hostname) === false ) { return; }
var realFetch = window.fetch;
window.fetch = function(input, init) {
if ( arguments.length >= 2 && typeof input === 'string' && input.includes('/access_token') ) {
var url = new URL(arguments[0]);
url.searchParams.delete('platform');
arguments[0] = url.href;
}
@digiwombat
digiwombat / RectTransformAnchorFeedback.cs
Created December 5, 2020 18:35
An anchor tweener for Juce Feedbacks.
using Juce.Tween;
using System.Collections.Generic;
using UnityEngine;
namespace Juce.Feedbacks
{
[FeedbackIdentifier("Anchors", "RectTransform/")]
public class RectTransformAnchorFeedback : Feedback
{
[Header(FeedbackSectionsUtils.TargetSection)]
// A cheap, ugly mask fix for SuperTextMesh if you enable/disable the parent mask of an STM mesh.
using UnityEngine;
public class STMFixMask : MonoBehaviour
{
private SuperTextMesh stm;
private void Awake()
{
stm = GetComponent<SuperTextMesh>();
@digiwombat
digiwombat / GraphPenaltySetter.cs
Last active April 18, 2024 06:09
Graph Penalty Setter for AStar
using UnityEngine;
using Pathfinding;
[Pathfinding.Util.Preserve]
public class GraphPenaltySetter : GridGraphRule
{
public LayerMask _layerMask;
public int penalty = 10000;
public override void Register(GridGraphRules rules)
@digiwombat
digiwombat / YouTubeSubscriptionRedirect.user.js
Last active March 24, 2023 22:25
YouTube Subscription Redirect
// ==UserScript==
// @name YouTube Subscription Redirect
// @description Automatically load the videos you actually care about
// @namespace B492B7DC-4C33-4E72-8316-49A425788F86
// @version 2.5
// @match *://www.youtube.com/*
// @run-at document-end
// @grant none
// @license MIT
// @updateURL https://gist.github.com/digiwombat/1d3a7b2b38ab6cd198b8714458550215/raw/YouTubeSubscriptionRedirect.user.js
@digiwombat
digiwombat / SizedFoldoutGroupAttribute.cs
Created February 12, 2021 05:01
SizedFoldoutGroup Attribute for Odin Inspector
namespace Sirenix.OdinInspector
{
#pragma warning disable
using System;
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)]
[System.Diagnostics.Conditional("UNITY_EDITOR")]
public class SizedFoldoutGroupAttribute : PropertyGroupAttribute
{
using PixelCrushers.DialogueSystem.SuperTextMeshSupport;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SequenceSubtitlePanel : SuperTextMeshSubtitlePanel
{
public override void Open()
{
public class DialogueParserExample : MonoBehaviour
{
public static string FilterText(string text)
{
const string genderStartTag = "[g=";
const int maxReplacements = 100;
if (text.Contains(genderStartTag))
{
@digiwombat
digiwombat / JitterFreeLit.shader
Created January 25, 2022 04:07
URP 2D Lit Smooth Pixel Scaling
Shader "Sprites/JitterFreeLit"
{
Properties
{
_MainTex("Diffuse", 2D) = "white" {}
_MaskTex("Mask", 2D) = "white" {}
_NormalMap("Normal Map", 2D) = "bump" {}
// Legacy properties. They're here so that materials using this shader can gracefully fallback to the legacy sprite shader.
[HideInInspector] _Color("Tint", Color) = (1,1,1,1)