Skip to content

Instantly share code, notes, and snippets.

View rkbhochalya's full-sized avatar

Rajendra Bhochalya rkbhochalya

View GitHub Profile
@rkbhochalya
rkbhochalya / mastodon-shlink-docker-installation-guide.md
Last active February 18, 2023 23:53
Mastodon & Shlink setup on a single server using Docker
@rkbhochalya
rkbhochalya / optimize-images.sh
Created May 16, 2017 10:17
Recursively optimize PNG and JPEG images using convert command
# Recursively optimize PNG and JPEG images using convert command
#
# `convert` is part of ImageMagick (http://www.imagemagick.org/). You will need to install it first.
#
# Author: Rajendra Kumar Bhochalya (http://rkb.io)
#
# @see https://developers.google.com/speed/docs/insights/OptimizeImages
# Optimize all JPEG images in current directory and subdirectories
find . -name "*.jpg" -exec convert "{}" -sampling-factor 4:2:0 -strip -quality 85 -interlace JPEG -colorspace RGB "{}" \; -exec echo "{}" \;