Last active
October 18, 2015 01:31
-
-
Save ryoakg/fe7105ba511a639840a6 to your computer and use it in GitHub Desktop.
placeholder image tag with lorempixel.com
This file contains 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
(defun insert-placeholder-img-tag (gray-p width height category) | |
"insert placeholder image tag with lorempixel.com" | |
(interactive | |
(list current-prefix-arg | |
(read-number "width: ") | |
(read-number "height: ") | |
(completing-read | |
"category: " | |
'("animals" "business" "cats" "abstract" "city" | |
"food" "nightlife" "fashion" "people" | |
"nature" "sports" "technics" "transport" "technics")))) | |
(insert (format "<img src=\"http://lorempixel.com/%s%d/%d/%s\">" | |
(if gray-p "g/" "") | |
width height category))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment