Skip to content

Instantly share code, notes, and snippets.

@kompowiec
kompowiec / vvv-FHS-start.sh
Last active May 3, 2025 16:05
config vvv script to adopt FHS
#!/bin/sh
# Resolve the script location (symlink-safe)
SCRIPT_DIR="$(cd "$(dirname "$(readlink -f "$0")")" && pwd)"
# Set the root of the app (we assume bin/ is next to lib/)
VVV_ROOT="$(dirname "$SCRIPT_DIR")/lib/vvv"
# Change directory to where the actual app lives
cd "$VVV_ROOT" || exit 1
# Set up environment
export LD_LIBRARY_PATH="$VVV_ROOT/firebird"
@kompowiec
kompowiec / GoneIn60s
Created April 5, 2025 13:46
The program recovers accidentally closed applications. You have 60 seconds to do this.
import time
import subprocess
import psutil
from collections import deque
import threading
import os
# Store recently closed processes
closed_apps = deque(maxlen=10)
import os
import shutil
import subprocess
import tkinter as tk
from tkinter import filedialog, messagebox
from collections import defaultdict
def get_file_sizes(directory):
files = []
for root, _, filenames in os.walk(directory):
@kompowiec
kompowiec / convert_cbr_to_cbz
Created November 21, 2024 12:57
CBR to CBZ converter
#!/bin/bash
# Find all CBR files recursively and process each
find . -type f -iname '*.cbr' | while read -r cbr_file; do
# Extract the directory and file name without extension
dir=$(dirname "$cbr_file")
base=$(basename "$cbr_file" .cbr)
# Create a temporary folder for extraction
temp_dir="${dir}/${base}_temp"
@kompowiec
kompowiec / Matrix.pm
Last active September 2, 2024 11:27
file format for Perl IRC Statistics Generator - https://pisg.github.io/ - matrix protocol
package Pisg::Parser::Format::Matrix;
use strict;
use warnings;
use Carp;
sub new
{
my ($type, %args) = @_;
my $self = {
@kompowiec
kompowiec / IRCcloud.pm
Last active September 1, 2024 11:51
file format for Perl IRC Statistics Generator - https://pisg.github.io/
package Pisg::Parser::Format::IRCcloud;
use strict;
$^W = 1;
sub new
{
my ($type, %args) = @_;
my $self = {
cfg => $args{cfg},
@kompowiec
kompowiec / Problem solving.md
Last active June 27, 2025 16:38
Marketing prompt for ChatGPT

✅ 1. Freeform Brainstorming Prompt Template

🧠 Use for: Micro-tasks, general ideation, quick hacks, first-draft ideas

I'm looking for creative ideas or practical suggestions for this situation:

[DESCRIBE YOUR PROBLEM / GOAL]

There are no strict constraints. Be unconventional if helpful, but make it usable in real life. 
import tqdm
import asyncio
from shazamio import Shazam, Serialize
import os
from multiprocessing import Pool, freeze_support, set_start_method
from datetime import datetime
async def recognize(song):
shazam = Shazam()
try:
@kompowiec
kompowiec / Wmonobook.js
Last active September 27, 2023 13:31
simple script to change wiki skin to monobook for Violentmonkey/tampermonkey/greasemonkey
// ==UserScript==
// @name change wiki skin to monobook
// Wikimedia projects
// @source Zera's userscripts
// @include *wikipedia.org*
// @include *wiktionary.org*
// @include *commons.wikimedia.org*
// @include *wikiquote.org*
// @include *wikibooks.org*
// @include *wikisource.org*
@kompowiec
kompowiec / najlepsze-posty.txt
Last active July 10, 2025 08:09
nie masz konta? dodaj swój tekst tutaj: https://yopad.eu/p/polska-knajpa-365days
Jun 16 21:00:33 <wirus> kompowiec sam ze soba gada
16 czerwca 21:00:39 <wirus> podstawia moje zdanie i na nie odpowidaa/clear
# 2022
19 marca 14:20:57 <skorpion52> tego, że po moim pytaniu czy jestem czytany odpowiedziałeś- niestety tak na górze mam jak byk odchylenie, że każdy jest mile widziany
19 marca 14:21:21 <skorpion52> więc jednak - niestety - temu przeczy
19 marca 14:22:14 <skorpion52> czyli potwierdzasz, że nie każdy jest tu mile widziany
19 marca 14:22:17 „Psychopata” – przecież to nie odnosiło się do dotarego
19 marca 14:22:24 <PsychopatH> tylko czata zastałem
19 marca 14:22:32 <kompowiec2> oi proszę, masz wyjaśnienieskorpion52
19 marca 14:22:57 <Psychopata> nie da się wymusić na ludziach, żeby każdego "mile widzieć"