Skip to content

Instantly share code, notes, and snippets.

View bo11ox's full-sized avatar
🏴󠁧󠁢󠁳󠁣󠁴󠁿
:rage4:

Rainer Strobo bo11ox

🏴󠁧󠁢󠁳󠁣󠁴󠁿
:rage4:
  • FFM/Germany
View GitHub Profile
@Jaykul
Jaykul / emojiprompt.ps1
Created May 7, 2019 17:19
An emoji prompt
function prompt {
if (Test-Success) {
$heart = "❤", "🧡", "💛", "💚", "💙", "💜", "💔", "💕", "💓", "💗", "💖", "💘", "💝" | Get-Random
"`e[107m`e[30mI${heart}PS`e[37m`e[49m" # that last character is the powerline >
} else {
$heart = "🧡", "💛", "💙", "🖤" | Get-Random
"`e[41m`e[37mI${heart}PS`e[31m`e[49m" # that last character is the powerline >
}
}
@LotteMakesStuff
LotteMakesStuff / LayoutUtils.cs
Last active November 2, 2023 21:04
Simple tool for importing editor layout files (.wlt files) from the asset folder. this is cool cos you can then share layouts with your team via source control
// put me in an Editor folder
using System.IO;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
public static class LayoutUtils
{
// unity stores layouts in a path referenced in WindowLayout.LayoutsPreferencesPath.
// Unfortunately, thats internal - well just creat the path in the same way they do!
@LotteMakesStuff
LotteMakesStuff / AutohookAttribute.cs
Last active March 18, 2025 14:51
[Autohook] property drawer for unity - Add this [Autohook] attribute to a property to and the inspector will automagically hook up a valid reference for you if it can find a component attached to the same game object that matches the field you put it on. You can watch a demo of this in action here https://youtu.be/faVt09NGzws <3
// NOTE DONT put in an editor folder!
using UnityEngine;
public class AutohookAttribute : PropertyAttribute
{
}
@pcgeek86
pcgeek86 / cheatsheet.ps1
Last active April 30, 2025 17:25
PowerShell Cheat Sheet / Quick Reference
Get-Command # Retrieves a list of all the commands available to PowerShell
# (native binaries in $env:PATH + cmdlets / functions from PowerShell modules)
Get-Command -Module Microsoft* # Retrieves a list of all the PowerShell commands exported from modules named Microsoft*
Get-Command -Name *item # Retrieves a list of all commands (native binaries + PowerShell commands) ending in "item"
Get-Help # Get all help topics
Get-Help -Name about_Variables # Get help for a specific about_* topic (aka. man page)
Get-Help -Name Get-Command # Get help for a specific PowerShell function
Get-Help -Name Get-Command -Parameter Module # Get help for a specific parameter on a specific command
@brettmillerb
brettmillerb / Get-TwitchEvent.ps1
Created January 11, 2019 16:04
Twitch User Events
function Get-TwitchEvent {
[CmdletBinding(DefaultParameterSetName = 'Standard')]
param (
[Parameter(Mandatory,
ParameterSetName = 'Standard')]
[string]
$UserName,
[Parameter(Mandatory,
ParameterSetName = 'Pipeline',
using Sirenix.OdinInspector;
using UnityEngine;
#if UNITY_EDITOR
#endif
/// <summary>
/// Placed where an obstacle will be spawned when the game loads.
/// Used to fake nested prefabs in a pre-2018.3 world.
/// </summary>
[ExecuteInEditMode]
@JohannesMP
JohannesMP / UIBlur.shader
Last active February 24, 2025 11:32
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
@ssshake
ssshake / isWrit
Last active June 21, 2024 10:28
Photon PUN Cheat Sheet
## Photon Methods
**public class Blank : Photon.PunBehaviour**
instead of mono behavior, use this to receive photon callbacks in your script.
**public override void OnLeftRoom()**
An example of overriding a punbehavior callback
@michalbrzozowski
michalbrzozowski / MultipleWorlds.cs
Created May 22, 2018 07:12
Sample showing a potential way to start and run multiple worlds.
using System;
using System.Linq;
using UnityEngine;
using Unity.Entities;
public class WorldBootstrap
{
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
public static void Initialize()
@ppolsinelli
ppolsinelli / GoogleSheetDownload.cs
Last active April 5, 2023 09:11
Getting Google Sheet Data Updates In Unity
YOUR METHOD HERE - BEGIN
if (SOME_CONTROL_OF_YOURS && Application.isEditor)
{
Action<string> commCallback = (csv) =>
{
LoadCSVText(csv);
};
StartCoroutine(DownloadCSVCoroutine(spreadSheetId, commCallback, true, "YOUR_ASSET_NAME_NO_EXT", tabId));