PDA

View Full Version : Simple shell script to vote for Steve


irod
Jul 15, 2003, 04:55 AM
http://www.macobserver.com/article/2003/07/09.4.shtml

Vote for Steve continuously on the Forbes CEO poll!

1) Make the following your Home page in Safari preferences:

http://forums.prospero.com/n/mb/viewpoll.asp?webtag=fdc_ceorate&tid=219&lgnF=y&dlink=1&vote=1&submit=%A0%A0Vote+Now%A0%3E%3E%A0%A0

2) Make a script in the text editor of your choice with the following commands:

#!/bin/sh
while [1]
do
open /Applications/Safari.app
sleep 10
killall Safari
rm -fr /Users/rod/Library/Cookies/Cookies.plist
done

Then open up Terminal and navigate to the directory that contains the file and type this:

chmod +x name_of_script

That's to make it executable.

Then while in that same directory in Terminal you can execute it with the command ./name_of_script

While running this script, it will continuously open Safari, wait 10 seconds (while the vote for Steve is submitted via the link), close Safari, delete your cookies, and start over. This way the vote will count every time.

Each reader could singlehandedly add over 100,000 votes to Steve in what's left of the month. Of course, you'd only want to leave it running whle you're away from your computer since it pretty much takes over by opening and closing Safari constantly.

You could adjust the value after 'sleep' if your computer takes longer to open the 'submit vote' page. You could also replace the link with:

http://forums.prospero.com/n/mb/viewpoll.asp?webtag=fdc_ceorate&tid=220&lgnF=y&dlink=1&vote=2&submit=%A0%A0Vote+Now%A0%3E%3E%A0%A0

To make it continuously vote No for Ballmer.

Enjoy!!!

maradong
Jul 15, 2003, 06:56 AM
i would n t do that.
reloading your browser every 10 seconds after hard killing it, is nor good for the general load of the system, nor for the bandwidth and of course not for th application core.

irod
Jul 15, 2003, 07:14 AM
LOL! You really have no idea what you're saying so I don't see why you bothered to post. The application "core"??? What in the world are you talking about!?... you gotta quit smoking that stuff man... :-)

Killing an app is just that. OS X is smart about memory management, so it frees up all the resources the process was using, so killing it has no impact on the "general load of the system." Why do you think OS X is so stable even if apps crash left and right.

Other than the resources it uses to open the app each time, which is just like quitting and opening an application, there's absolutely nothing to worry about.

And bad for the bandwith? Since when is opening and closing an app bad for your bandwith? And if you mean loading that page every 10 seconds, give me a break. It's 3k. That amounts to about 400k per day if you're running the script the whole 24 hours of it! Damn, get a clue man.

scan300
Jul 15, 2003, 08:53 AM
What's the point of artificially stacking a poll? If the poll results are fake, it serves no real purpose as a poll.

irod
Jul 15, 2003, 08:58 AM
The purpose is beating those Wintel suckers who have been stacking the poll against Steve. It's all just for fun. Chill out.

http://www.macobserver.com/article/2003/07/09.4.shtml

Eniregnat
Jul 15, 2003, 10:13 AM
First off: Do the ends justify the means. Ethically it rubs against me, mostly because I know there is little reliability in self moderated surveys. Secondarily, I just donít believe in skewing results for my own selfish ends. Thirdly, it seems to be a waste of time and energy. (Itís funny though ;))

Secondarily: I know that OSX has smart memory management, but I can tell you the Bomb utility managed eventually crash OSX regardless of how robust they have managed to make it. So repeatedly killing an app may not have any immediate ramifications, and if any arise a reset would likely fix the problem, but your dealing with a complicated set of systems and it is impossible to predict what it does to your OS and computer in the long term. Ah hell, I sound like a parent with one to many college courses under my belt.

Lastly, if your going burn processor time Fold (http://www.stanford.edu/group/pandegroup/folding/) or SETI.

You are clever though. I like seeing people that exploit tools to new and interesting ends. I also like how you proliferated the knowledge. The latter is the most important part. Keep the information free and keep it flowing.

scan300
Jul 16, 2003, 03:23 AM
Originally posted by irod
Chill out.

http://www.macobserver.com/article/2003/07/09.4.shtml

I was ice cold. It was just a question.

solvs
Jul 16, 2003, 04:37 AM
Thanks, but this old news.

As a matter of fact, I think I'll be removing it from my sig, as now it's become something of a joke. Feel free to screw with Forbes, though. It was their stupid idea to make the Poll so easy to screw with. They just wanted hits on their web page anyway.

MrMacMan
Jul 16, 2003, 08:05 AM
I don't even think the script works because once I go to the page it says I couldn't access it... :confused:

http://forums.prospero.com/n/mb/viewpoll.asp?webtag=fdc_ceorate&tid=220&lgnF=y&dlink=1&vote=2&submit=%A0%A0Vote+Now%A0%3E%3E%A0%A0

meh,

hvfsl
Jul 16, 2003, 08:21 AM
We also need a script so that we can vote no for M$'s Steve. Maybe it will push push down the share price a bit and reduce Bill's money by a few hundred million.

Edit: OK there already is one for M$.

bousozoku
Jul 16, 2003, 10:03 AM
You should probably replace the /Users/rod with ~ so that it works for everyone in their own home directory.

Royal Pineapple
Jul 16, 2003, 06:47 PM
Originally posted by bousozoku
You should probably replace the /Users/rod with ~ so that it works for everyone in their own home directory.
i was gonna point that out ;) damn you beating me to it :D

irod
Jul 17, 2003, 01:39 PM
Oops, you're right! :D

irod
Jul 17, 2003, 01:40 PM
LOL Forbes closed the Jobs and Ballmer polls today! How funny is that. You can still vote for the other CEO's though.

crenz
Jul 17, 2003, 01:55 PM
Now that the poll is closed :) I'd say it is much easier to just do

wget -o - http://... > /dev/null

instead of opening and closing Safari...

Of course, I wouldn't vote for Steve Jobs anyway, since I can't say I'm happy with some of his decisions that affect apple customers :( .

irod
Jul 17, 2003, 02:02 PM
That wouldn't work. The reason people used the Safari scripts is because you have to follow 3 http redirects (which Safari does automatically, wget and curl don't) and accept the cookie, for the vote to count.

crenz
Jul 17, 2003, 02:22 PM
Thanks for the correction, irod. I didn't think of that! Although wget usually follows one redirection, it wouldn't work in this case with multiple redirections and cookies. That would be a case for Perl and WWW::Automate :), if you're Perl-savvy.

bousozoku
Jul 18, 2003, 12:25 AM
We could always just create an application with a search engine to find all polls for Steve Jobs, read the HTML and follow the path, and vote for him. :D