Skip to content

Instantly share code, notes, and snippets.

@philipn
Created January 18, 2012 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philipn/1632060 to your computer and use it in GitHub Desktop.
Save philipn/1632060 to your computer and use it in GitHub Desktop.
request.py diff for SOPA and PIPA
wikispot@leo:~/Sycamore$ diff request.py.old request.py
34a35,172
> MAX_POST_PER_MINUTE = 40
>
> DO_SOPA = True
> SOPA_HTML = """<html lang="en">
> <head>
> <title>Davis Wiki - Day of Protest</title>
>
> <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
> <style type="text/css">
>
>
> body {
> background: #000;
> text-align: center;
> font-family: 'Open Sans', sans-serif;
> }
>
> a { color: #c00; }
> .action {
> font: bolder 20px/40px 'Open Sans', sans-serif;
> display: block;
> width: 300px;
> background: #c00;
> color: #fff;
> border: 2px solid #600;
> border-radius: 4px;
> text-decoration:none;
> text-transform: uppercase;
> margin: auto;
> background: -webkit-gradient(linear, left top, left bottom, from(#ED1C24), to(#AA1317));
> background: -moz-linear-gradient(top, #ED1C24, #AA1317);
> filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed1c24', endColorstr='#aa1317');
> }
> .action:hover {
> color: #DE898C;
> background: -webkit-gradient(linear, left top, left bottom, from(#AA1317), to(#ED1C24));
> background: -moz-linear-gradient(top, #AA1317, #ED1C24);
> filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#aa1317', endColorstr='#ed1c24');
> }
>
> #page {
> margin: auto;
> width: 800px;
> text-align: left;
> }
>
> #header {
> margin-bottom: 0.6em;
> }
> #header h1 {
> color: #c00;
> text-align: center;
> font: bold 55px 'Open Sans', sans-serif;
> margin-bottom: 0.5em;
> padding-bottom:0;
> font-size: 170%;
> }
>
> #content {
> background: #dca;
> padding: 0.3em 30px 0 30px;
> }
> #content p {
> font: 12pt 'Open Sans', sans-serif;
> }
>
> #portalformore {
> text-align: center;
> width: 500px;
> margin-left: 120px;
> border: 2px solid black;
> border-radius: 4px;
> background: #ccc;
> }
> #portalformore h2 {
> }
> #portalformore p {
> font-size: 10pt;
> }
>
> </style>
> </head>
>
> <body>
> <div id="page">
> <div id="header">
> <img src="http://farm8.staticflickr.com/7033/6718439607_1db721264a_m.jpg">
> </div>
> <div id="content">
> <h1 class="title">PROTECT FREE SPEECH ONLINE</h1>
>
> <p>Bills are being presented at the US Congressional level that will damage the ability for people in Davis &mdash; and people around the world &mdash; to gather online and speak freely. These bills strike out major free speech protections that make sites like DavisWiki possible. If passed, sites like DavisWiki may be forced to shut down.
> </p>
>
> <p>The Davis Wiki has been blacked out for 24 hours to raise awareness of these threats and engage in a protest against the Stop Online Piracy Act (SOPA) in the U.S. House of Representatives, and the PROTECTIP Act (PIPA) in the U.S. Senate.</p>
>
> <div id="portalformore">
>
> <h2><a class="action" href="http://americancensorship.org/modal/call-form-moz.html">TAKE ACTION</a></h2>
>
> <p>Looking to learn more?<br />
> <a target="_blank" href="http://fightforthefuture.org/pipa">Watch the video</a> &middot;
> <a target="_blank" href="http://americancensorship.org/">American Censorship page</a> &middot;
>
> <a target="_blank" href="http://americancensorship.org/infographic.html">View the Infographic</a> <br>
> <a target="_blank" href="http://www.opencongress.org/bill/112-h3261/show">Read SOPA on OpenCongress</a> &middot;
> <a target="_blank" href="http://www.opencongress.org/bill/112-s968/show">Read PIPA on OpenCongress</a>
> </p>
> </div>
>
>
> <p>The Davis Wiki was created by and for the people of Davis. It is a passionate creation based on concepts that we hold as virtues here in Davis: collaboration, equality, volunteerism and contribution from all corners of our beloved city. The bills presented assume a purely commercial motive for all actions, on the net and off. We have a town where clear examples of beauty and altruistic giving are repeated daily. We deserve an internet where the same is celebrated rather than treated with suspicion and the threat of demolition for anything created by normal people. An internet of common people rather than a monitored and enforced vehicle for celebrities and corporate interests.</p>
>
> <p>The Wiki is not alone. Dozens of other online groups are threatened that represent the people of Davis. From the Davis Community Network to Davis Patch, blogs like the Davis Voice, even the Enterprise website: all are threatened by these bills.</p>
>
> <h2>"I took action against SOPA / PIPA!"</h2>
> <p><em>Did you take action against SOPA / PIPA today? Send us an <strong>email at <a href="mailto:daviswiki@gmail.com">daviswiki@gmail.com</a> or tweet at <a target="_blank" href="http://twitter.com/daviswiki">@daviswiki on twitter</a> with a photo of yourself</strong> and we'll post it here!</em></p>
>
> <div id="gallery">
> <a target="_blank" href="http://farm8.staticflickr.com/7005/6718576199_2ae66e5019.jpg"><img src="http://farm8.staticflickr.com/7005/6718576199_2ae66e5019_m.jpg"></a>
> </div>
>
> <h2>Local events</h2>
> <p>There will be <strong>a talk about Internet freedom at King Hall at 4PM today</strong>. The speaker, Rebecca MacKinnon is a TED talks speaker and an expert on Chinese internet censorship, and she will be talking about internet freedom and censorship. The talk takes place at King Hall from 4 to 5 p.m. and is free to the public.</p>
>
> <hr/>
> <p style="font-size: x-small;"><em>Want to report an error in this page or help make it better? <a href="http://cheshirehall.net/dw/irc/">Join us on IRC in #daviswiki on freenode</a> to collaborate on our blackout effort.</em></p>
>
>
>
> <br clear="both"/>
> </div>
> <div id="footer"></div>
>
> </div>
> </body>
> </html>"""
>
668a807,812
> if DO_SOPA:
> if self.config.domain == "daviswiki.org":
> self.status = "503 Service Unavailable"
> self.write(SOPA_HTML)
> return self.finish()
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment