Skip to content

Instantly share code, notes, and snippets.

View gabonator's full-sized avatar
👨‍🏭
at work

Gabriel Valky gabonator

👨‍🏭
at work
View GitHub Profile
@gabonator
gabonator / buildserver.py
Created November 23, 2026 22:37
altagate AG1K fpga toolchain and build service for win32
"""
Remote FPGA Build Server
Runs on Windows 7 with Quartus/AGM toolchain installed.
Accepts Verilog source files, runs synthesis in a temp folder,
streams raw stdout bytes over WebSocket (preserving ANSI codes).
Requirements: pip install flask flask-sock
Usage: python build_server.py --tools-dir C:\path\to\tools [--port 5000]
The --tools-dir should contain quartus\bin and Supra\bin subdirectories.
@gabonator
gabonator / bitrock_unpack.py
Created November 22, 2026 23:50
bitrock archive unpacker
#!/usr/bin/env python3
"""
BitRock/CookFS installer unpacker.
Lists or extracts all files from a BitRock installer (.exe) that uses
CookFS virtual filesystem with LZMA/zlib page compression.
Tested with Quartus II 13.1 installer (CFS2.2 / CFS0002 format).
Usage:
@gabonator
gabonator / gen_license.py
Created November 1, 2026 22:18
DS203 license generator
#!/usr/bin/env python3
"""
DS203 License Generator
Reverse-engineered from DFU bootloader and SYS V1.60 source.
Two DFU algorithm variants exist, both using hash = hash * 31 + byte:
NEW (DFU >= V2.81): init=0xDEC0DE02, serial loop i=20..30, const2 loop i=57..70
OLD (DFU < V2.81): init=0xDEC0DE02, serial loop i=2..12, const contrib=0x4013E5E1
@gabonator
gabonator / fun.md
Last active October 25, 2026 10:21
windows batch fun

Sranda s batch fajlami

Predstavenie

title predstavujem sa
color 9
echo Ahoj ja sa volam gabo
echo Mam rad macky
echo Uz nechodim do skoly
@gabonator
gabonator / lego.html
Created June 30, 2026 11:29
Lego sumo tournament
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LEGO Robot Cup</title>
<style>
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Segoe UI',Arial,sans-serif;background:#1a1a2e;color:#eee;min-height:100vh}
.screen{display:none;min-height:100vh}
@gabonator
gabonator / turret.ino
Created May 13, 2026 22:11
esp8266 servo controlled turret with joystick
/*
* mcu: ESP 8266 Boards 3.0 - LOLIN Wemos (D1 R2 & mini)
*
* UHS modification: https://www.hackster.io/usini/plug-any-usb-device-on-an-esp8266-e0ca8a
*
* pinout:
* D3 - UHS.SS
* D7 - UHS.MISO
* D6 - UHS.MOSI
* D5 - UHS.SCK
@gabonator
gabonator / dmxcontroller.html
Created October 22, 2025 23:21
laser projector cat&mouse anim
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>DMX Channel Configurator — Live Values</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
.channel-card { border-radius: 14px; background:white; padding:16px; box-shadow:0 6px 18px rgba(15,23,42,0.06); border:1px solid rgba(15,23,42,0.04); }
@gabonator
gabonator / rick.cpp
Created June 24, 2025 14:13
rick dangerous 2 single file amalgamate
This file has been truncated, but you can view the full file.
// build flags: -D HEADLESS
#include <stdint.h>
#include <assert.h>
#include <string.h>
#include <vector>
#define CHAR_BIT 8
//typedef attribute(( __align__(1) )) uint16_u;
@gabonator
gabonator / align.py
Created August 4, 2024 22:07
Align a photo of table for OCR, trim to contents
import sys
import cv2
import numpy as np
def custom_processing_function(b, g, r):
r = int(r)
g = int(g)
b = int(b)
y = (r+g+b)/3
mdif = max(abs(y-r), abs(y-g), abs(y-b))
@gabonator
gabonator / recognize.swift
Created August 4, 2024 22:06
OCR with OSX Vision
// OCR code for processing photos of data structured in tables without installation of any package
// use: swift recognize.swift photo.jpeg
// It should return the 2D structure as JSON
import Cocoa
import Vision
struct TableCell {
var x: Int
var y: Int