Skip to content

Instantly share code, notes, and snippets.

View thaikolja's full-sized avatar
🥥
I do things.

Kolja Nolte thaikolja

🥥
I do things.
View GitHub Profile
@thaikolja
thaikolja / macos-quick-action-image-converter.sh
Created December 4, 2025 08:14
For macOS Quick Action in "Automator": Shell Script to Quickly Format image(s) into .webp, .avif, etc.
# !/bin/bash
#
# Script to convert images to a selected format using ImageMagick's mogrify.
# It handles existing files in the same format by renaming them to avoid overwriting.
#
# USAGE: `./convert.sh image1.jpg image2.png` etc. (when `FORMAT="webp"`)
# OUTPUT: `image1.webp`, `image2.webp` in the same directories as the input images
#
# To be used as copy-paste script for macOS Automator app to create
# a Quick Action that converts selected images in Finder to webp format.
@thaikolja
thaikolja / README.md
Last active April 20, 2025 22:20
A flexible Bash script that can be used directly or via a cron job to automatically delete files and folders older than a specified number of days. A great script to keep log folders and other directories clean.

Old Files Cleaner

License: MIT Shell Script

Old Files Cleaner is a simple yet effective shell script that automatically deletes old files from a specified directory. It helps keep your file system tidy by removing files older than a certain number of days. You can also tell it to ignore specific folders and file types, and it even has a "dry-run"ng anything. This script is perfect for setting up as a cron job to clean up old mode so you can test it without actually deleti files regularly.

🚀 Features

Old Files Cleaner includes the following features: