Skip to content

Instantly share code, notes, and snippets.

View JamesBurgess's full-sized avatar

James Burgess JamesBurgess

View GitHub Profile
@adammyhre
adammyhre / AllocCounter.cs
Created October 19, 2025 12:34
Allocation Analyzer
using System;
using UnityEngine.Profiling;
// See UnityEngine.TestTools.Constraints.AllocatingGCMemoryConstraint
// and https://maingauche.games/devlog/20230504-counting-allocations-in-unity/
public class AllocCounter {
UnityEngine.Profiling.Recorder rec;
public AllocCounter() {
rec = Recorder.Get("GC.Alloc");
@BrianAmadori
BrianAmadori / OutlineShader.shader
Last active August 7, 2023 22:46
Screen buffer based depth outline shader
//
// Screen space based depth outline. No post processing setup needed.
//
// - Enable Depth Buffer on URP settings.
// - Put any geometry with this shader (like a Quad) in front of geometry.
// - Voila.
//
// This shader is based on the work of Mirza Beig.
// https://github.com/MirzaBeig/Post-Processing-Wireframe-Outlines
//
@tattyd
tattyd / Shadow.cs
Last active October 21, 2025 07:33
Soft shadow control for Unity UI Toolkit
/* MIT License
Copyright (c) 2022 David Tattersall
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@Chillu1
Chillu1 / FullscreenGameView.cs
Last active May 16, 2025 13:08
FullscreenGameView utility, for automatic fullscreen on play with toggle option (Game view fullscreen in editor)
/*
MIT License
Copyright (c) 2021 Chillu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is

Simple Security Guidelines

Using an iDevice? (Best option)

  • Use an iPod or an iPad without a SIM card
  • Use an iPhone
  • Do not jailbreak
  • Always upgrade to new iOS versions
  • Use Brave browser

Need Secure chat?

@luckylooke
luckylooke / angularMergePolyfill.js
Last active November 27, 2017 07:56
angular.merge polyfill for angular < 1.4.0
if (!angular.merge) {
angular.merge = (function mergePollyfill() {
function setHashKey(obj, h) {
if (h) {
obj.$$hashKey = h;
} else {
delete obj.$$hashKey;
}
}
@timofei7
timofei7 / TTMonoBehaviour.cs
Created March 15, 2015 20:08
monobehaviour extension that adds exception handling, aalue retrieval, and locking to Unity C# coroutines
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Extending MonoBehaviour to add some extra functionality
/// Exception handling from: http://twistedoakstudios.com/blog/Post83_coroutines-more-than-you-want-to-know
///
/// 2013 Tim Tregubov
@mattcassinelli
mattcassinelli / Simplenote List
Last active January 3, 2016 19:11
Simplenote action list to Open the app, create a blank New Note, and to add new notes with a tag for Work, Ideas, URL, or my blog AppBookPro.
simplenote://[[list:Add to SimpleNote|Open=:|New Note=new?content=|Work=new?content=&tag=work|Ideas=new?content=&tag=ideas|URL=new?content=&tag=URL|AppBookPro=new?content=&tag=appbookpro]]
simplenote://
[[
list:Add to SimpleNote
|Open=:|New Note=new?content=
|Work=new?content=&tag=work
|Ideas=new?content=&tag=ideas
|URL=new?content=&tag=URL
|AppBookPro=new?content=&tag=appbookpro
@voidfiles
voidfiles / gist:2289046
Created April 3, 2012 03:22
Simplenotes new iOS URL scheme
Hey Alex, there aren't any docs yet. Here's the info:
simplenote://new?content=encodedContent&tag=encodedTag
The parameters are optional. If omitted, Simplenote will open to a new, blank note.