Skip to content

Instantly share code, notes, and snippets.

View mariolacko's full-sized avatar

Mario Lacko mariolacko

View GitHub Profile
@mariolacko
mariolacko / Download PDF statement from Mail.scpt
Created December 1, 2024 07:12
Automates processing of email attachments in Apple Mail, saving PDFs to sender-specific folders, decrypting protected files, and setting file dates. Save this script to ~/Library/Application Scripts/com.apple.mail/ to use with Apple Mail rules.
(*
Script for processing emails in Apple Mail.
This script automatically processes emails with specific attachments (e.g., PDFs),
decrypts them if necessary, and saves them in designated folders based on the sender's email address.
Author: Mario Lacko & ChatGPT
Date: November 30, 2024
Tested on: macOS Sequoia with Apple Mail and qpdf installed via Homebrew
Dependencies:
@mariolacko
mariolacko / oldgames-magazine-dl.py
Created February 3, 2023 15:16
Skript na sťahovanie časopisov zo servera www.oldgames.sk. Primárne slúži na archiváciu časopisov zo servera. Tento skript najprv stiahne zoznam časopisov, následne stiahne všetky JPG súbory, preženie ich OCR a vytvorí PDF.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "Mario Lacko"
__copyright__ = "Copyright (C) 2023"
__license__ = "Public Domain"
__version__ = "0.9"
import re
import ssl
@mariolacko
mariolacko / upload.php
Created October 17, 2020 15:17 — forked from taterbase/upload.php
Simple file upload in php
<!DOCTYPE html>
<html>
<head>
<title>Upload your files</title>
</head>
<body>
<form enctype="multipart/form-data" action="upload.php" method="POST">
<p>Upload your file</p>
<input type="file" name="uploaded_file"></input><br />
<input type="submit" value="Upload"></input>
@mariolacko
mariolacko / XorFiles.c
Created August 14, 2017 17:17
Pomocný program na zisťovanie šifrovania pomocou funkcie XOR. Dva vstupné súbory sa vzájomne "xorujú" a výsledok by mala byť šifra. Jeden súbor je nezašifrovaný, druhý je ten istý ale zašifrovaný. Vo výsledku by sme mali dostať šifru.
/*
* XorFiles.c
* Copyright (C) 2017 Mario Lacko
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ...
@mariolacko
mariolacko / JB_Coder.c
Last active August 14, 2017 17:10
Program pre MS-DOS (Borland C++ 3.1) na dekódovanie súborov pre hru "Mutation of Johny Burger". Dekóder pre demo aj plnú hru.
/*
* JB_Coder.c
* Copyright (C) 2017 Mario Lacko
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ...
@mariolacko
mariolacko / tatrabanka-rename.sh
Last active January 13, 2018 09:38
Skript premenuje výpisy z Tatra banky na zrozumiteľnejší tvar, odhesluje a pôvodné vymaže
#!/bin/sh
# Súbor premenuje výpisy z Tatra banky na zrozumiteľnejší tvar, odhesluje a pôvodné vymaže
# Pre Mac OS X (macOS):
# Doinštalovať sa dá pomocou MacPorts (www.macports.org), ktoré rožšírujú funkcionalitu OS X
# po doinštalovaní MacPorts sa qpdf nainštaluje príkazom:
# sudo port install qpdf
# Pre Debian, Ubuntu Linux:
# sudo apt-get install qpdf
# Globálne konštanty
@mariolacko
mariolacko / convert.bat
Last active February 10, 2017 19:22
Mass conversion of AVI files to MP4
@echo off
SET count=0
set files=0
set exe="C:\Program Files\Handbrake\HandBrakeCLI"
for %%A in (*.avi) do set /a files+=1
for /f "tokens=*" %%G in ('dir /b /o:n *.avi') do (call :transcode "%%G")
GOTO :eof