Skip to content

Instantly share code, notes, and snippets.

View philipprochazka's full-sized avatar

Philip Procházka philipprochazka

View GitHub Profile
@philipprochazka
philipprochazka / extractor_root_metadata.py
Created July 2, 2025 23:24
Recursively scan a folder for SVG/CSS, For each file, extract its metadata. Output a single batch_summary.extract.md with a TOC{Table of Contents} and collapsible per-file sections,
import sys
import os
from pathlib import Path
import xml.etree.ElementTree as ET
import re
# --- Hybrid extraction functions (from extractor_hybrid.py, refactored) ---
def extract_svg_doc_properties(svg_root):
width = svg_root.attrib.get('width', 'unknown')
import sys
import re
from pathlib import Path
import xml.etree.ElementTree as ET
# === Helper functions ===
def extract_svg_doc_properties(svg_root):
width = svg_root.attrib.get('width', 'unknown')
height = svg_root.attrib.get('height', 'unknown')
@philipprochazka
philipprochazka / extract_colors_to_markdown.py
Last active July 2, 2025 22:50
extract svg or css colors to a markdown colorwriteout
import re
import sys
from pathlib import Path
# Regex patterns for color formats
HEX_COLOR_RE = re.compile(r'#(?:[0-9a-fA-F]{3,4}){1,2}')
RGB_COLOR_RE = re.compile(r'rgb(?:a)?\(\s*[\d\s,\.%]+\)')
HSL_COLOR_RE = re.compile(r'hsl(?:a)?\(\s*[\d\s,\.%]+\)')
NAMED_COLOR_RE = re.compile(r':\s*([a-zA-Z]+)\s*;')
CSS_VAR_RE = re.compile(r'--([\w-]+)\s*:\s*([^;]+);')
@philipprochazka
philipprochazka / Windows_11-Tweaks-Mmotti.ps1
Created May 17, 2025 11:55
Usefull loop blocks for Powershell and general OS-Management
. "$PSScriptRoot\assets\classes.ps1"
Function Test-IsAdminElevated {
if (([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::
GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
return $true
}
else {
return $false
}

‎‎​

@philipprochazka
philipprochazka / curl_cheatsheet.md
Created December 19, 2024 23:46 — forked from mpoerwito/curl_cheatsheet.md
curl cheatsheet from HTB

cURL

Command Description
 curl -h cURL help menu
 curl inlanefreight.com Basic GET request
 curl -s -O inlanefreight.com/index.html Download file
 curl -k https://inlanefreight.com Skip HTTPS (SSL) certificate validation
 curl inlanefreight.com -v Print full HTTP request/response details
 curl -I https://www.inlanefreight.com Send HEAD request (only prints response headers)
@philipprochazka
philipprochazka / AdbCommands
Created May 15, 2024 20:41 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
############################################################################
# This file was created with O&O ShutUp10 and can be imported onto another computer.
#
# Download the application at https://www.oo-software.com/shutup10
# You can then import the file from within the program.
#
# Alternatively you can import it automatically over a command line. Simply use
# the following parameter:
# ooshutup10.exe <path to file>
#
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/prettierrc.json",
"definitions": {
"optionsDefinition": {
"type": "object",
"properties": {
"arrowParens": {
"description": "Include parentheses around a sole arrow function parameter.",
"default": "always",
@philipprochazka
philipprochazka / .gitignore
Created March 8, 2024 14:13
.gitignore -Global
*.tmp
# Word temporary
~$*.doc*
# Word Auto Backup File
Backup of *.doc*
# Excel temporary
~$*.xls*