Skip to content

Instantly share code, notes, and snippets.

@danrichman
Last active January 25, 2016 13:30
Show Gist options
  • Save danrichman/7aecf2f4dcfc4189ace1 to your computer and use it in GitHub Desktop.
Save danrichman/7aecf2f4dcfc4189ace1 to your computer and use it in GitHub Desktop.
Sarah Palin Fictional Quote Generator v1.0
<?php
/*
* Sarah Palin Fictional Quote Generator v1.0
* Demo: http://palinquotes.herokuapp.com
*
* MIT License:
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
echo '<!doctype html><html lang="en"><head><meta charset="UTF-8"><title>Palinisms - Sarah Palin Fictional Quote Generator</title></head><body><div style="width:500px;margin:50px auto;font:bold 38px Helvetica;color:#000;">';
$first = array("With his warnings two years ago about ", "It is for no more politics as usual and ", "It has been overwhelming to me that confirmation of ", "At the same time, ", "As Senator McCain has said, ", "Well, there is a danger in allowing ", "I'm ill about the position that America is in, and", "I see the United States as being a force for ", "And as Ronald Reagan believed that ", "I see our country being able to represent those things ", "I'm not one of those who feel like ", "The way that I have understood the world is ", "We can't afford to lose ", "That strategy that has worked in Iraq that ", "Some decisions that have been made poorly, ", "Senator McCain also showed great appreciation for what America ", "He's also known as the maverick, ", "But no, the Pakistani people ", "It's very important when you consider even ", "It's Alaska ", "I think, with Ahmadinejad, personally ", "We don't have to second-guess ", "As Putin rears his head ", "What I think Americans at the end of the day are going to be able to go back and look at ");
$total_first = count($first);
$pick_first = rand(0, $total_first-1);
echo $first[$pick_first];
$second = array("obsessive partisanship", "building new relationships", "working with existing allies", "the track record", "the leadership qualities", "the pragmatism", " &#8212; as a result of this latest crisis", "who's more apt to be talking about solutions", "about solutions and wishing for and hoping for solutions", "there has got to be action", "as it has been proposed", "John McCain and I have both been discussing", "should not be rewarded", "with his warnings", "that is what America needs today", "a multi-faceted solution", "that has to be considered also", "who were predator lenders", "being the beacon of light", "the dealings with Freddie and Fannie", "to make sure that an eye is being kept on", "powerful nation", "had pushed for more troops", "on a much more local level been", "these central fronts on the war on terror", "also rallying against", "as it's been proposed", "also bipartisan effort", "who are hell bent", "whether that is part of the solution or not", "the impact", "with inalienable rights", "if a larger power");
$total_second = count($second);
$pick_second = rand(0, $total_second-1);
echo $second[$pick_second];
$third = array(" and we are a free-thinking society.", " that will be our top priority is to defend the American people.", " back and forth.", " where it is the taxpayers.", " to help shore up our economy.", ", not as competitive, scary thing, but one in five jobs being created in the trade sector today.", " to look at that as more opportunity.", " for healthcare reform.", " have provided me a lot of perspective on the world.", " as I asked President Karzai.", " strategy that has worked in Iraq.", " &#8212; they want freedom.", " of the evil in the world.", " so we don't have to be takers from federal government.", " proving that he can work both sides of the aisle.", " and victory in the war, you can't blink.", "&#8212; the need to reform government.", " is the undo influence of lobbyists in public policy decisions being made.", " and I would hope that's the case.", " at a crisis time like this.", " for opportunity to change it.", " the road that America may find itself on.", " not pointing fingers at one another.", " finding a solution and taking action.", " has to be considered also.", " for this problem that America is facing today.", ", we are getting into crisis mode here.", " &#8212; that's more than a lot of other senators and representatives did for us.", " trying to get people to understand what he's been talking about.", " &#8212; that's paramount.", " and we've got to keep an eye on Russia.", " and we've got to remember what the desire is in this nation at this time.", " good old boy network that has been the Washington elite.", " and they are our next door neighbor.", " that I believe are God-given.", " in making those tough decisions of where we go and even who we target.", " to get caught up in this evil, in this terror.", " those terrorists who would seek to destroy America and our allies.", " and we must not blink.", " &#8212; we have got to have all options out there on the table.");
$total_third = count($third);
$pick_third = rand(0, $total_third-1);
echo $third[$pick_third];
echo '</div><div style="color:#aaa;width:500px;text-align:right;font:13px Helvetica;font-style:italic;margin:0 auto">&#8212; Fictional Sarah Palin Quote Generator v1.0</div><div style="text-transform:uppercase;color:red;width:500px;text-align:center;letter-spacing:1px;font:10px Helvetica;margin:50px auto 0 auto"><a href="#" onClick="window.location.reload( true );" style="color:red;text-decoration:none">Refresh this page to generate another fictional quote</a></div><div style="text-transform:uppercase;color:#bbb;width:350px;font:10px Helvetica;position:absolute;bottom:20px;left:20px"><strong>Disclaimer:</strong> The quotes on this page &#8212; even those based on actual statements &#8212; are entirely fictional.</div></body></html>';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment