Skip to content

Instantly share code, notes, and snippets.

View sgergely's full-sized avatar

Gergely Schmidt sgergely

View GitHub Profile
sgergely /
Last active August 28, 2023 09:28
Crop the bottom of the image by maintaining the 16:9 aspect ratio
# Set the desired width
# Calculate the corresponding height for 16:9 aspect ratio
height=$((width * 9 / 16 ))
# Loop through all JPEG files in the current directory
for file in *.png; do
sgergely / gist:3793166
Created September 27, 2012 09:43
Midnight Commander Keyboard Shortcuts for Mac OSX
View gist:3793166
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name