Skip to content

Instantly share code, notes, and snippets.

View Lachee's full-sized avatar
📖
xkcd.com/1421/

Lake Lachee

📖
xkcd.com/1421/
View GitHub Profile
@Lachee
Lachee / QuickPropertyDrawer.cs
Last active January 31, 2024 02:06
Quickly open properties with a single button click
using UnityEngine;
using UnityEditor;
[CustomPropertyDrawer(typeof(Object), true)]
public class QuickPropertyDrawer : PropertyDrawer
{
const float BUTTON_SIZE = 20f;
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
bool showButton = property.objectReferenceValue != null;
@Lachee
Lachee / UYAMLObjects.cs
Last active March 25, 2024 08:25
Script that can read and parse Unity YAML files into basic trees.
using Lachee.Utilities.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lachee.Utilities.Serialization
{
public interface IUPropertyCollection
@Lachee
Lachee / OpenTTS.html
Last active May 9, 2023 06:03
Converts your speech into text, and then into speech again in mostly real time using the Web Speech API. (CHROME ONLY)
<html>
<head>
<style>
* { font-family: Arial, Helvetica, sans-serif;}
div {
background: #00000008;
margin: 10px;
min-height: 1em;
@Lachee
Lachee / gshade_to_reshade_guide.md
Created February 7, 2023 13:03 — forked from lostkagamine/gshade_to_reshade_guide.md
GShade -> ReShade migration guide for FFXIV

How To Move To ReShade From GShade

(a guide by rika (@lostkagamine). tested, should work fine.)

(Korean version / 한국어 버전)

If you are having issues like the screen turning black, read the mini-FAQ at the bottom of this document!

0. Don't uninstall GShade yet!

Uninstalling GShade removes the gshade-shaders folder which contains all the content. It does not remove GShade's executable file. This guide will help you do that.
If you already uninstalled it, reinstall it. Sounds weird, I know, but just don't open the game.

@Lachee
Lachee / Polyfil.ts
Last active December 11, 2022 17:33
Svelte CloudFlare Polyfil
/**
This polyfil solves some of the issues svelte's cloudflare adapter has with goto and localStorage being.... iffy.
This will polyfil the goto as a stub for SSR and polyfil the localStorage as a simple array storage.
Feel free to implement your own polyfils for localStorage to actually be useful too, i only request you share it forwards.
Author: Lachee
License: MIT (do what you want)
Date: 12/12/2022
*/
@Lachee
Lachee / pride.scss
Last active December 19, 2023 18:39
SASS Mixin for Pride Flags
// Pride Flag Mixin
// Author: Lachee
// License: MIT (do what you want)
@mixin pride-background {
&.lgbt {
background: linear-gradient(180deg, #FE0000 16.66%, #FD8C00 16.66%, 33.32%, #FFE500 33.32%, 49.98%, #119F0B 49.98%, 66.64%, #0644B3 66.64%, 83.3%, #C22EDC 83.3%);
}
&.asexual {
background: linear-gradient(180deg, #181818 25%, #A3A3A3 25%, 50%, #FFFFFF 50%, 75%, #800080 75%);
}
@Lachee
Lachee / AutoAttribute.cs
Created May 5, 2022 10:19
The [Auto] will automatically link components to the script
using UnityEngine;
namespace Lachee.Utilities
{
/// <summary>
/// Automatically fetches attached components
/// </summary>
[System.AttributeUsage(System.AttributeTargets.Field, AllowMultiple = false)]
public class AutoAttribute : PropertyAttribute
{
@Lachee
Lachee / PrivateAvatar.cs
Last active February 24, 2022 06:15
Enforces Avatar Privating
/**
* This avatar has been marked as private. As per the licensing agreement when downloading this model,
* you are not allowed to share it.
*
* This script automatically disables the share button in VRChat when publishing to help enforce this rule.
*
* Script Author: Lachee
* Installation: Include this script in any folder called Editor.
* For additional safety, also include the PrivateAvatarBehaviour and uncomment the configuration
*
@Lachee
Lachee / UUID.php
Last active November 5, 2021 02:33
Packs / Unpacks a integer ID into a pseudo faux UUID's with signature to verify origins. Formatting is customisable.
<?php
// Required if you are putting in a namespace:
// namespace app\helpers;
// use InvalidArgumentException;
/**
* Packs / Unpacks a integer ID into a pseudo faux UUID's ( 8-8-12 ) with signature to verify origins.
* Not secure, but provides an abstraction layer to hide the true nature of your database.
*
@Lachee
Lachee / Example.cs
Created September 2, 2021 23:16
Singleton class
public class Level : Singleton<Level>
{
public void DoStuff();
}
void OtherAccess() {
Level.instance.DoStuff();
}