Skip to content

Instantly share code, notes, and snippets.

View peasant98's full-sized avatar

Matt Strong peasant98

View GitHub Profile

This is my perfect sandwich.

  • 12 Inch Whole Wheat
  • Turkey
  • Swiss
  • Toasted
  • Tomato
  • Cucumber
  • Lettuce
  • Mayo
@dawsbot
dawsbot / image-minifier.sh
Last active December 20, 2019 16:40
Lossless image compression for all images in current directory
#!/bin/bash
# Minify all jpg and png images in current directory recursively
command_exists () {
type "$1" &> /dev/null ;
}
# Learn more about optipng at http://sweetme.at/2013/09/11/how-to-maximize-png-image-compression-with-optipng/
if command_exists optipng ; then
optipng -o2 -strip all **/*.png
else