Skip to content

Instantly share code, notes, and snippets.

View downthecrop's full-sized avatar

downthecrop downthecrop

View GitHub Profile
@downthecrop
downthecrop / webm_player.py
Created February 12, 2025 08:04
PyQt6 WebM Player With Transparency
import sys
import subprocess
import json
import numpy as np
from PyQt6.QtWidgets import QApplication, QMainWindow, QWidget, QLabel, QPushButton, QVBoxLayout, QHBoxLayout, QFileDialog
from PyQt6.QtGui import QImage, QPixmap
from PyQt6.QtCore import Qt, QTimer
# Supports transparent WebM videos in VP8 or VP9 format.
@downthecrop
downthecrop / pyglet_overlay_macos.py
Created December 21, 2024 05:54
Creates a transparent, draggable overlay window using pyglet and implements a global key listener with pynput to detect keypresses. The overlay is designed for macOS, featuring always-on-top behavior and adjustable transparency. Keypress events, like the Enter key, are logged with timestamps using the logging module. Accessibility permissions ar…
import sys
import pyglet
import pyglet.graphics
import pyglet.shapes
from pynput import keyboard as pynput_keyboard
import threading
import logging
# Configure logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(message)s')
@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: