Created
April 25, 2012 03:07
-
-
Save RobinStamer/2485887 to your computer and use it in GitHub Desktop.
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
| #!/bin/sh | |
| ( | |
| cat <<END | |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <script> | |
| var a = [ | |
| END | |
| ls *.jpg *.gif *.png | sort -r | sed 's/.*/"&",/g' | |
| cat <<END | |
| ""] | |
| a.pop() | |
| function changeImage() { | |
| document.getElementById('pic').src = a[Math.floor(Math.random() * a.length)] | |
| } | |
| setInterval(changeImage, 15 * 60 * 1000) | |
| </script> | |
| </head> | |
| <body onload="changeImage()"> | |
| <img id="pic" src="error.jpg" width="100%" /> | |
| </body> | |
| </html> | |
| END | |
| ) > index.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment