Skip to content

Instantly share code, notes, and snippets.

@onjin
Created September 22, 2011 10:54
Show Gist options
  • Save onjin/1234533 to your computer and use it in GitHub Desktop.
Save onjin/1234533 to your computer and use it in GitHub Desktop.
mini gallery
mkdir -p mini; for img in `ls *.jpg`; do convert -fill white -geometry 100x200 -size 100x200 -scale 100x200 $img mini/$img; echo "<a style='display: block; width: 100px; height: 200px; float: left; margin: 10px; border: solid 1pX #ccc' href='$img' onclick='window.open(this.href); return false'><img src='mini/$img' /></a>"; done > gallery.html
google-chrome gallery.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment