Created
May 30, 2012 13:26
-
-
Save rriemann/2836323 to your computer and use it in GitHub Desktop.
Parallel shell loop using prll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>fancyBox - Fancy jQuery Lightbox Alternative | Demonstration</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<!-- Add jQuery library --> | |
<script type="text/javascript" src="fancyapps-fancyBox-e4836f7/lib/jquery-1.8.2.min.js"></script> | |
<!-- Add mousewheel plugin (this is optional) --> | |
<script type="text/javascript" src="fancyapps-fancyBox-e4836f7/lib/jquery.mousewheel-3.0.6.pack.js"></script> | |
<!-- Add fancyBox main JS and CSS files --> | |
<script type="text/javascript" src="fancyapps-fancyBox-e4836f7/source/jquery.fancybox.js?v=2.1.3"></script> | |
<link rel="stylesheet" type="text/css" href="fancyapps-fancyBox-e4836f7/source/jquery.fancybox.css?v=2.1.2" media="screen" /> | |
<!-- Add Button helper (this is optional) --> | |
<link rel="stylesheet" type="text/css" href="fancyapps-fancyBox-e4836f7/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" /> | |
<script type="text/javascript" src="fancyapps-fancyBox-e4836f7/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script> | |
<!-- Add Thumbnail helper (this is optional) --> | |
<link rel="stylesheet" type="text/css" href="fancyapps-fancyBox-e4836f7/source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" /> | |
<script type="text/javascript" src="fancyapps-fancyBox-e4836f7/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script> | |
<!-- Add Media helper (this is optional) --> | |
<!-- <script type="text/javascript" src="fancyapps-fancyBox-e4836f7/source/helpers/jquery.fancybox-media.js?v=1.0.5"></script> --> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
/* | |
* Simple image gallery. Uses default settings | |
*/ | |
/* | |
* Thumbnail helper. Disable animations, hide close button, arrows and slide to next gallery item if clicked | |
*/ | |
$('.fancybox').fancybox({ | |
closeBtn : true, | |
arrows : true, | |
nextClick : true, | |
helpers : { | |
thumbs : { | |
width : 50, | |
height : 50 | |
} | |
} | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<h1>fancyBox</h1> | |
<p> | |
<a class="fancybox" href="DSC_0751.JPG" data-fancybox-group="gallery" title=""><img src="thumbs/DSC_0751.JPG" alt="" /></a> | |
</p> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://prll.sourceforge.net/ | |
source ~/bin/prll.sh | |
myfn() { | |
mkdir -p /tmp/thumbs/${1%/*}; | |
[ ! -f "/tmp/thumbs/${1}" ] && convert -define jpeg:size=1500x1200 "$1" -quality 75 -auto-orient -thumbnail 1366x768\> "/tmp/thumbs/${1}" | |
} | |
#myfn for square thumbnails: | |
# http://superuser.com/questions/275476/square-thumbnails-with-imagemagick-convert | |
myfn() { | |
mkdir -p /tmp/thumbs/${1%/*}; | |
[ ! -f "/tmp/thumbs/${1}" ] && convert -define jpeg:size=400x400 "$1" -quality 75 -thumbnail 200x200\^ -gravity center -auto-orient -extent 100x100\> "/tmp/thumbs/${1}" | |
} | |
# fancybox gallery | |
for file in *.JPG; do 2012-11-13 | |
echo "<a class="fancybox" href=\"$file\" data-fancybox-group=\"gallery\" title=\"\"><img src=\"thumbs/$file\" alt=\"\" /></a>" | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment