Skip to content

Instantly share code, notes, and snippets.

@amatelin
amatelin / gimp_img_downsize.py
Last active November 8, 2021 15:49
A simple script to automatically downsize all the images in a folder using Gimp python console (Gimp->Filters/Python-Fu/console).
from os import listdir
from os.path import isfile, join
## Set image folder path
dir_path = "C:/img_dir/"
## Store files names in folder
files = [f for f in listdir(dir_path) if isfile(join(dir_path, f))]
for file in files:
@amatelin
amatelin / white-rabbit.sh
Last active June 27, 2016 08:39
A very simple introduction to bash scripting reproducing the classic scene from the Matrix (https://www.youtube.com/watch?v=6IDT3MpSCKI).
#!/bin/bash
# You need to install pv for it to work (sudo apt-get install pv)
# Don't forget to change the permissions on the file (sudo chmod +x white-rabbit.sh)
# Then just run ./white-rabbit.sh and enjoy
CURSOR="$USER@$HOSTNAME:${PWD}$"
echo -n $CURSOR
echo " Wake up, Neo..." | pv -qL 10