Skip to content

Instantly share code, notes, and snippets.

View henare's full-sized avatar

Henare Degan henare

View GitHub Profile
@henare
henare / alaveteli
Created April 9, 2015 06:50
kedumba's Alaveteli init script that's required when deploying using Capistrano as of Alaveteli 0.19: https://github.com/mysociety/alaveteli/blob/release/0.19/doc/CHANGES.md#version-019
#! /bin/sh
### BEGIN INIT INFO
# Provides: application-righttoknow
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Provides a restart task for capistrano deployments of Right To Know
# Description: Alaveteli expects this script to be available to restart Passenger so this restarts both staging and production
### END INIT INFO
To: henare.degan@gmail.com
Subject: Your OpenAustralia email alert
X-PHP-Originating-Script: 1000:utility.php
X-Mailer: PHP/5.5.9-1ubuntu4.5
MIME-Version: 1.0
Precedence: bulk
From: OpenAustralia.org <henare@openaustralia.org>
Reply-To: OpenAustralia.org <henare@openaustralia.org>
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
echo "Hello this is Exetel Speed Test"
echo "Hello this is Exetel speed test" >> SpeedTestResults.txt
date >> SpeedTestResults.txt
echo "=================================================" >> SpeedTestResults.txt
ifconfig -a >> SpeedTestResults.txt
# Outputs tons of network information into the command prompt
echo "=================================================" >> SpeedTestResults.txt
ping -c4 www.google.com >> SpeedTestResults.txt
# Ping google to figure out if we’ve got internet!
echo "All done pinging Google."
*** Getting representatives bills, starting at 1
Bill not found for R1
Bill not found for R2
Bill not found for R3
Bill not found for R4
Bill not found for R5
Bill not found for R6
Bill not found for R7
Bill not found for R8
Bill not found for R9
Date: Thu, 27 Nov 2014 16:03:12 +1100
From: They Vote For You <contact@theyvoteforyou.org.au>
To: matthew@oaf.org.au
Message-ID: <5476b0907e4ba_5e57743e98633af@mana.mail>
Subject: =?UTF-8?Q?Policy_=E2=80=9Cfor_dusty_ponies_that_are_covered_in?=
=?UTF-8?Q?_pony_dust=E2=80=9D_updated_on_They_Vote_For_You?=
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_5476b0907d055_5e57743e986328";
charset=UTF-8
<division divdate="2010-09-29" divnumber="1" id="uk.org.publicwhip/debate/2010-09-29.49.1" nospeaker="true" time="12:47:00" url="http://parlinfo.aph.gov.au/parlInfo/search/display/display.w3p;query=Id:chamber/hansardr/2010-09-29/0000">
<divisioncount ayes="73" noes="72" tellerayes="2" tellernoes="2"/>
<memberlist vote="aye">
<member id="uk.org.publicwhip/member/1" vote="aye">Tony John Abbott</member>
<member id="uk.org.publicwhip/member/589" vote="aye">John Alexander</member>
<member id="uk.org.publicwhip/member/612" vote="aye">Karen Andrews</member>
<member id="uk.org.publicwhip/member/13" vote="aye">Kevin James Andrews</member>
<member id="uk.org.publicwhip/member/26" vote="aye">Bob Charles Baldwin</member>
<member id="uk.org.publicwhip/member/38" vote="aye">Bruce Fredrick Billson</member>
<member id="uk.org.publicwhip/member/42" vote="aye">Mrs Bronwyn Kathleen Bishop</member>
<division>
<division.header>
<time.stamp>09:45:00</time.stamp>
<para>The House divided.     </para>
</division.header>
<para>(The Speaker—Mr Harry Jenkins)</para>
<division.data>
<ayes>
<num.votes>72</num.votes>
<title>AYES</title>
#!/usr/bin/env python
import scraperwiki
import urllib2
import lxml.etree
urls = ["http://www.finance.gov.au/sites/default/files//sites/default/files/P33_ABBOTT_Tony.pdf","http://www.finance.gov.au/sites/default/files//sites/default/files/P33_ALBANESE_Anthony.pdf","http://www.finance.gov.au/sites/default/files//sites/default/files/P33_ALEXANDER_John.pdf","http://www.finance.gov.au/sites/default/files//sites/default/files/P33_BALDWIN_Bob.pdf","http://www.finance.gov.au/sites/default/files//sites/default/files/P33_BIRD_Sharon.pdf","http://www.finance.gov.au/sites/default/files//sites/default/files/P33_BISHOP_Bronwyn.pdf","http://www.finance.gov.au/sites/default/files//sites/default/files/P33_BOWEN_Chris.pdf","http://www.finance.gov.au/sites/default/files//sites/default/files/P33_BRADBURY_David.pdf","http://www.finance.gov.au/sites/default/files//sites/default/files/P33_BURKE_Tony.pdf","http://www.finance.gov.au/sites/default/files//sites/default/files/P33_CAMERON_Doug.pdf","http://www.finance.gov.au/sites/defa
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.