Skip to content

Instantly share code, notes, and snippets.

View bukowa's full-sized avatar

Mateusz Kurowski bukowa

View GitHub Profile
@bukowa
bukowa / configuration.nix
Last active September 18, 2026 00:11
dell e7440 power saver nixos config
# ==============================================================================
# QUICK UPDATE COMMAND (Copy & paste into terminal):
# sudo curl -fL -H "Cache-Control: no-cache" "https://gist.githubusercontent.com/bukowa/8ae90a4d3028c23a78b7ed93a8896cfc/raw/configuration.nix?$(date +%s)" -o /etc/nixos/configuration.nix && sudo nixos-rebuild switch
# ==============================================================================
# ==============================================================================
# SYSTEM CONFIGURATION: POWER-OPTIMIZED, REPRODUCIBLE BUILD (DELL LATITUDE E7440)
#
# Usage & Features:
# - [Super + H] Shortcuts Help: Displays an interactive GUI guide with all active hotkeys
@bukowa
bukowa / tester.ino
Last active September 12, 2026 00:16
batter tester
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
// --- KONFIGURACJA EKRANU ---
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET -1
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

Total War: Rome 2 — Campaign AI Task Generators Reference

"Task Generators are modular AI heuristics that translate campaign map conditions into actionable, prioritized military missions for armies."


How the TMS Model Works (Engine Overview)

The Campaign AI in Rome 2 uses a three-stage pipeline to evaluate and assign armies:

@bukowa
bukowa / README.md
Last active August 22, 2026 01:09
Running Two Instances of *Total War: Attila* on One PC (LAN Multiplayer)

Running Two Instances of Total War: Attila on One PC (LAN Multiplayer)


Step 1: Prepare Game Folders & Goldberg Emulator

  1. Duplicate the Game: Create two separate copies of your Total War: Attila folder (e.g., Attila_Host and Attila_Player2).
  2. Install Goldberg Emulator into BOTH folders:
    • Copy the 32-bit steam_api.dll from the emulator archive into both folders (overwrite the original file).
    • In both folders, create a text file named steam_appid.txt containing 325610.
  • In both folders, create an empty text file named local_save.txt directly next to Attila.exe.
@bukowa
bukowa / template.ini
Last active May 16, 2026 23:15
Rainmeter template
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[Variables]
FontName=Segoe UI
FontSize=11
FontColor=255,255,255,230
BgColor=0,0,0,180
@bukowa
bukowa / stm32keyboard.ino
Created April 14, 2026 02:07
stm32 keyboard
#include <Keyboard.h>
// Definicje pinów dla BluePill
#define LED_PIN PC13
#define USB_DISC_PIN PA12
void setup() {
// 1. Konfiguracja wbudowanej diody
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, HIGH); // Na BluePill HIGH = dioda zgaszona
@bukowa
bukowa / backup.sh
Created October 27, 2025 19:33
backup octoprint
#!/bin/bash
set -e
# --- Configuration ---
CONTAINER_NAME="octoprint"
BACKUP_FILENAME="/tmp/octoprint-full-snapshot-$(date +%F).tar.gz"
TEMP_DIR="/tmp/octoprint_backup_staging"
# --- This script MUST be run as root/sudo ---
if [ "$EUID" -ne 0 ]; then
@bukowa
bukowa / close_pseudocode_plugin.py
Last active February 25, 2026 00:39
ida close all psedocode except "A"
# A plugin that registers a hotkey (Shift+W) to close pseudocode windows.
#
# HOW TO INSTALL AND USE:
# 1. Save this file as "close_pseudocode_plugin.py".
# 2. Find your IDA plugins directory.
# 3. Copy the "close_pseudocode_plugin.py" and "ida_plugin.json" file into that directory.
# 4. Restart IDA Pro. The hotkey will now be active.
# 5. Press Shift+W anytime to run the script.
import ida_kernwin
@bukowa
bukowa / Dockerfile
Last active October 21, 2025 19:25
python -m uvicorn run:app --host 0.0.0.0 --port 8255 --reload
# Use an official Python runtime as a parent image
FROM python:3.13-slim
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file into the container at /app
COPY requirements.txt .
# Install any needed packages specified in requirements.txt
import sys
import random
import os
def memory_churn_for_debugging():
"""
Allocates 2GB of string-like data, waits for a debugger to attach,
then enters a maximum-speed loop to continuously and randomly modify the data.
"""
target_bytes = 2 * 1024 * 1024 * 1024 # 2 GB