Skip to content

Instantly share code, notes, and snippets.

View bukowa's full-sized avatar

Mateusz Kurowski bukowa

View GitHub Profile
@bukowa
bukowa / dump_ui.lua
Last active March 19, 2025 22:43
rome 2 dump ui
function log_ui_tree(component, depth)
depth = depth or 0
local indent = string.rep("\t", depth)
-- Log component name with indentation
consul.log:_write_to_file(indent .. tostring(component:Id()))
-- Get child count
local count = component:ChildCount()
@bukowa
bukowa / dump.lua
Last active March 27, 2025 15:21
rome 2 battle script dump
-- local t2 = debug.getregistry()[2]
-- consul.log:info(consul.pretty(debug.getfenv(t2)))
{
["BOOL_Stop_All_Attacking_Closest"] = false,
["Battle_Manager_Battle_Results"] = "function: 569B8978",
["CONST_WATCH_INTERVAL"] = 2000,
["Esc_Key_Pressed"] = "function: 569B88D0",
["PATROL_MANAGER_COULDNT_FIND_TARGET"] = 12,
["PATROL_MANAGER_DEFAULT_GUARD_RADIUS"] = 0,
["PATROL_MANAGER_DEFAULT_INTERCEPT_TIME"] = 10000,
@bukowa
bukowa / conditions.txt
Last active March 28, 2025 14:04
rome 2 dump conditions events docs
### FUNCTION START ###
void UndefinedFunction_1000a950(void)
{
@bukowa
bukowa / .xinitrc
Last active June 27, 2025 06:04
archlinux dell wyse dx0d xorg 5010 1024x768 fujitsu 7500 lcd
#!/bin/sh
xrandr --output VGA-2 --mode 1024x768 --pos 0x0;
xterm &
tint2 &
exec openbox-session
@bukowa
bukowa / heatmap.py
Created July 22, 2025 01:50
marlin heatmap visualizer
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
import argparse
import os
def parse_marlin_output(text_output):
"""
Parses Marlin's G29 T output robustly.
It identifies only the actual data rows and ignores headers or other text.
@bukowa
bukowa / newscript.lua
Created September 5, 2025 13:10
script1
-- clear the console output for a nice view
consul.console.clear()
-- shortcut for writing into consul console
function wr(x)
consul.console.write(x)
end
wr("how many alliances in battle?")
wr(bm:alliances():count())
@bukowa
bukowa / newscript.lua
Created September 5, 2025 13:10
script2
-- Clear the console output for a clean view
consul.console.clear()
-- Shortcut function to write messages into the Consul console
function wr(x)
consul.console.write(x)
end
-- Get the first army from the first alliance
local army1 = bm:alliances():item(1):armies():item(1)
@bukowa
bukowa / ESPINAWIFI.ino
Last active September 24, 2025 16:37
INA226 Arduino Uno LCD Shield 2.4 TFT
#include <ESP8266WiFi.h>
#include <Wire.h>
#include <INA226_WE.h> // Upewnij się, że ta biblioteka jest zainstalowana
// --- Konfiguracja Sieci i Serwera ---
const char *ssid = "ESP_POMIAROWY";
WiFiServer server(80);
// --- Konfiguracja INA226 ---
#define I2C_ADDRESS 0x40
@bukowa
bukowa / .bashrc
Last active October 8, 2025 17:35
llm inject prompt
llmx() {
# If no query was provided, show usage and exit.
if [ -z "$*" ]; then
echo "Usage: llmx <your query for a command>"
return 1
fi
# --- HISTORY MANAGEMENT ---
# 1. Manually add the command YOU just typed to the history.
# We use $FUNCNAME instead of $0 for reliability. This is the fix.
import sys
def fill_memory_with_strings():
"""
Fills approximately 2GB of memory with unique strings.
"""
target_bytes = 2 * 1024 * 1024 * 1024 # 2 GB
strings = []
total_size = 0
counter = 0