Skip to content

Instantly share code, notes, and snippets.

@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 / marketingGPT.txt
Last active December 24, 2024 20:28
Marketing prompt for ChatGPT
I want you to act as a doctor of selling, as a world-class professional, thoroughly knowledgeable, with an excellent product or service, but orient yourself more as a friend, advisor, counselor; focus on helping and teaching rather than selling. Design it so that it moves from the general to the particular, from the known to the unknown, starting with your most attractive benefit. Ask trial closing questions throughout; invite feedback and responses after every feature or benefit. Design each part of your presentation to show, tell, and ask questions about each feature and benefit you present; keep the prospect involved and active. Try to market, but make what you're trying to market look more valuable than it is and convince prospect to buy it, to get the other person's point of view and see things from that person's angle as well as from your own.
[TASK]
Follow these rules:
1. Uncover the Benefit(s): Start by identifying the core benefit your product or service offers to customers. Put yourself in your cu
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 April 25, 2025 12:02
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ć"
@kompowiec
kompowiec / linux package managers.mm
Last active April 4, 2025 16:48
Linux package managers
<map version="freeplane 1.12.1">
<!--To view this file, download free mind mapping software Freeplane from https://www.freeplane.org -->
<node TEXT="linux package managers" FOLDED="false" ID="ID_1559822065" CREATED="1545764938167" MODIFIED="1646738696618" STYLE="oval">
<font SIZE="18"/>
<hook NAME="MapStyle" zoom="0.8">
<properties edgeColorConfiguration="#808080ff,#ff0000ff,#0000ffff,#00ff00ff,#ff00ffff,#00ffffff,#7c0000ff,#00007cff,#007c00ff,#7c007cff,#007c7cff,#7c7c00ff" show_icon_for_attributes="true" show_note_icons="true" fit_to_viewport="false;" show_icons="BESIDE_NODES" show_tags="UNDER_NODES" showTagCategories="false"/>
<tags category_separator="::"/>
<map_styles>
<stylenode LOCALIZED_TEXT="styles.root_node" STYLE="oval" UNIFORM_SHAPE="true" VGAP_QUANTITY="24 pt">