Skip to content

Instantly share code, notes, and snippets.

View downthecrop's full-sized avatar

downthecrop downthecrop

View GitHub Profile
@downthecrop
downthecrop / claudebruteforce.md
Created July 14, 2024 12:26
not a great answer originally

Prompt:

this function is used to convert an id to a guid, how can I just dump all the guid to id pairs? // Token: 0x0600C2D5 RID: 49877 RVA: 0x0035F45C File Offset: 0x0035D65C public int HAJLICNNNMP(CosmeticItemType DKBDPKPHJGK, long AIGBFKINGAO) { CustomizationSheet customizationSheet; int result; if (this._sheets.TryGetValue(DKBDPKPHJGK, out customizationSheet) && customizationSheet.PartLookUp.TryGetValue(AIGBFKINGAO, out result)) { return result; } return -1; }

Response:

To dump all the GUID to ID pairs, you could modify this function or create a new one that iterates through all the sheets and their parts. Here's a possible approach:

Copypublic Dictionary<long, int> DumpAllGuidToIdPairs()
{
 Dictionary guidToIdPairs = new Dictionary();
@downthecrop
downthecrop / Claude.md
Created July 8, 2024 12:52
Claude 3.5 Sonnet

Conversation: Unity URP Shader Development

Human:

Can you write me a simple lit URP shader for unity with a normal, base, and metalic maps

Assistant:

Certainly. Here's a simple lit URP (Universal Render Pipeline) shader for Unity that includes normal, base (albedo), and metallic maps. I'll provide the shader code using ShaderLab syntax with HLSL:

Shader "Custom/SimpleLitURP"
Shader "Xffect/displacement/screen"
{
Properties
{
_DispMap("Displacement Map (RG)", 2D) = "white" {}
_MaskTex("Mask (R)", 2D) = "white" {}
_DispScrollSpeedX("Map Scroll Speed X", Float) = 0
_DispScrollSpeedY("Map Scroll Speed Y", Float) = 0
_StrengthX("Displacement Strength X", Float) = 1
_StrengthY("Displacement Strength Y", Float) = -1
@downthecrop
downthecrop / plugin.kt
Last active May 19, 2024 06:21
basic menu system for settings
package UILib
import UILib.plugin.ParentFrame.isUIVisible
import plugin.Plugin
import plugin.annotations.PluginMeta
import plugin.api.API
import plugin.api.FontColor
import plugin.api.FontType
import plugin.api.TextModifier
import java.awt.Color
@downthecrop
downthecrop / readme.md
Created May 10, 2024 15:42
Chrome disable Cross-Origin Embedder Policy (COEP) on localhost

disable Cross-Origin Embedder Policy (COEP) on localhost

install (it requires nodejs/npm)

npm install http-server -g

#run

http-server -p 3000 --cors

@downthecrop
downthecrop / README.md
Last active January 2, 2024 08:42
GPT Being Extremely Smart

Person:

  • I'd like to add a new "suboption" to the "select" of a menu item in my gridnavigator that will allow users to cycle through different options for esxample << Option1 >>, << Option2>> by using the left and right inputs that are already mapped to "movecursor" events
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
@downthecrop
downthecrop / GPT-4 Giving a "bad" working example.md
Created September 8, 2023 00:14
GPT-4 Degraded Performance Example

This is an example of the degraded performance of GPT-4.

The original version does work and give the correct result but it isn't "Vue-like". It's doing direct DOM manipuliation. Using a framework like Vue if you find yourself needing to search the DOM for elements for set properties you are probably doing something wrong.

Below is an example of code that GPT-4 suggested.

While it is able to correct its answers after being prompted the original responses provided a bad foundation for the page.

@downthecrop
downthecrop / README.md
Created June 28, 2023 06:43
2009Scape Ground Items Plugin

GroundItems Plugin

GroundItems is a Runelite-like plugin, providing a customizable overlay for in-game ground items.

Usage

You can interact with the GroundItems plugin using the following commands:

@downthecrop
downthecrop / GPT.md
Last active June 23, 2023 01:03
GPT being insanely good at programming

User: can you extract the FOV from here?

	private static void method4175(@OriginalArg(0) float arg0, @OriginalArg(1) float arg1, @OriginalArg(2) float arg2, @OriginalArg(3) float arg3, @OriginalArg(4) float nearClip, @OriginalArg(5) float farClip) {
		@Pc(3) float local3 = nearClip * 2.0F;
		matrix[0] = local3 / (arg1 - arg0);
		matrix[1] = 0.0F;
		matrix[2] = 0.0F;
		matrix[3] = 0.0F;
		matrix[4] = 0.0F;
 matrix[5] = local3 / (arg3 - arg2);
@downthecrop
downthecrop / 2009levelv2.html
Last active May 15, 2023 18:11
Wow It's fixed!
<canvas id="canvas" width="660" height="251">your canvas loads here</canvas>
<p>If the background doesn't load just submit again until it does.</p>
<br>
<p>If you don't want a background so you can edit in photoshop just delete the url.</p>
<br>
<input id="username" placeholder="username"></input>
<button id="submit">Submit</button>