notes on javascript, linux, and more

4.01.2008

april fools prank: 'when doves cry' on all the office printers' display panels

#!/bin/bash

doves=( "Dig if u will the picture" "Of u and I engaged in a kiss" "The sweat of your body covers me" "Can u my darling" "Can u picture this?" "Dream if u can a courtyard" "An ocean of violets in bloom" "Animals strike curious poses" "They feel the heat" "The heat between me and u" "How can u just leave me standing?" "Alone in a world thats so cold? (so cold)" "Maybe Im just 2 demanding" "Maybe Im just like my father 2 bold" "Maybe youre just like my mother" "Shes never satisfied (shes never satisfied)" "Why do we scream at each other" "This is what it sounds like" "When doves cry" "Touch if u will my stomach" "Feel how it trembles inside" "Youve got the butterflies all tied up" "Dont make me chase u" "Even doves have pride" "How can u just leave me standing?" "Alone in a world so cold? (world so cold)" "Maybe Im just 2 demanding" "Maybe Im just like my father 2 bold" "Maybe youre just like my mother" "Shes never satisfied (shes never satisfied)" "Why do we scream at each other" "This is what it sounds like" "When doves cry" "How can u just leave me standing?" "Alone in a world thats so cold? (a world thats so cold)" "Maybe Im just 2 demanding (maybe maybe Im like my father)" "Maybe Im just like my father 2 bold (ya know hes 2 bold)" "Maybe youre just like my mother (maybe youre just like my mother)" "Shes never satisfied (shes never never satisfied)" "Why do we scream at each other (why do we scream why)" "This is what it sounds like" "When doves cry" "When doves cry (doves cry doves cry)" "When doves cry (doves cry doves cry)" "Dont cry (dont cry)" "When doves cry" "When doves cry" "When doves cry" "When doves cry (doves cry doves cry doves cry" "Dont cry" "Darling dont cry" "Dont cry" "Dont cry" "Dont dont cry")

#55 for doves
while [ 1 ]; do
for (i=0;i<55;i+=1) {
./hpsetdisp.pl 10.9.100.1 \"${doves[i]}\"
}

This will output the contents of the 'doves' array to the LCD panel on an HP printers in my office. Just swap out the IP address for the IP of some HP printer in your office, and run the script. You can do it from cygwin for windows if you don't have any unix boxen. There was a problem with some of the printers, they would error out after a few minutes, I think the memory was filling up too fast maybe? Who knows. It was fun while it lasted. Maybe I'll work that out for next April.

Of course unix or not, you'll still need bash, perl, and the script at http://kovaya.com/perl/show.cgi?program=hpsetdisp.pl
put the perl script in the same directory as the bash script.

My thanks to the writer of hpsetdisp.pl.

No comments:

About Me

My photo
chicago, il, United States
I'm a software engineer by profession.

Labels