This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'sinatra' | |
| require 'haml' | |
| get '/' do | |
| @answer = question | |
| haml :index | |
| end | |
| helpers do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INSERT INTO `party` VALUES | |
| (21,'Independent',13,NULL,NULL,'independent',NULL,NULL), | |
| (22,'Australian Labor Party (ALP)',13,NULL,NULL,'australian_labor_party_(ALP)',NULL,NULL), | |
| (23,'Building Australia Party',13,NULL,NULL,'building_australia_party',NULL,NULL), | |
| (24,'Liberal Democratic Party',13,NULL,NULL,'liberal_democratic_party',NULL,NULL), | |
| (25,'Secular Party of Australia',13,NULL,NULL,'secular_party_of_australia',NULL,NULL), | |
| (26,'The Climate Sceptics',13,NULL,NULL,'the_climate_sceptics',NULL,NULL), | |
| (27, 'Country Labor Party', 13, NULL, NULL, 'country_labor_party', NULL, NULL), | |
| (28, 'No Parking Meters Party', 13, NULL, NULL, 'no_parking_meters_party', NULL, NULL), | |
| (29, 'Outdoor Recreation Party', 13, NULL, NULL, 'outdoor_recreation_party', NULL, NULL), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'hpricot' | |
| require 'gollum' | |
| wiki = Gollum::Wiki.new('openaustralia.wiki') | |
| file = File.open("OpenAustralia-20110309232515.xml", "r") | |
| doc = Hpricot(file) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Returns the state for a postcode. | |
| * eg. NSW | |
| * | |
| * @author http://waww.com.au/ramblings/determine-state-from-postcode-in-australia | |
| * @link http://en.wikipedia.org/wiki/Postcodes_in_Australia#States_and_territories | |
| */ | |
| function findState($postcode) { | |
| $ranges = array( | |
| 'NSW' => array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE `category_election` ( | |
| `category_election_id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , | |
| `category_id` INT( 11 ) NOT NULL , | |
| `election_id` INT( 11 ) NOT NULL | |
| ) ENGINE = MYISAM ; | |
| INSERT INTO `category_election` (category_id, election_id) SELECT category_id, 1 FROM category; | |
| INSERT INTO `category_election` (category_id, election_id) SELECT category_id, 2 FROM category; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require './dslmodem.rb' | |
| raise "Incorrect number of arguments supplied. Need URL, username and password" if ARGV.size != 3 | |
| modem = DSLModem.new(ARGV[0], ARGV[1], ARGV[2]) | |
| while true | |
| modem.get_stats_page | |
| statistics = modem.statistics |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'json' | |
| require 'open-uri' | |
| require 'csv' | |
| require 'date' | |
| # Github credentials to access your private project | |
| USERNAME="myusername" | |
| PASSWORD="mypassword" | |
| # Project you want to export issues from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INSERT INTO constituency (name,constituency_type_id,area_code,url_id) VALUES ('Albert',6,'QLD','albert'); | |
| INSERT INTO constituency (name,constituency_type_id,area_code,url_id) VALUES ('Charters Towers',6,'QLD','charters_towers'); | |
| INSERT INTO constituency (name,constituency_type_id,area_code,url_id) VALUES ('Hinchinbrook',6,'QLD','hinchinbrook'); | |
| INSERT INTO constituency (name,constituency_type_id,area_code,url_id) VALUES ('Mount Coot-tha',6,'QLD','mount_coot-tha'); | |
| INSERT INTO constituency (name,constituency_type_id,area_code,url_id) VALUES ('South Brisbane',6,'QLD','south_brisbane'); | |
| INSERT INTO constituency (name,constituency_type_id,area_code,url_id) VALUES ('Algester',6,'QLD','algester'); | |
| INSERT INTO constituency (name,constituency_type_id,area_code,url_id) VALUES ('Chatsworth',6,'QLD','chatsworth'); | |
| INSERT INTO constituency (name,constituency_type_id,area_code,url_id) VALUES ('Inala',6,'QLD','inala'); | |
| INSERT INTO constituency (name,constituency_type_id,area_code,url_id) VALUES ('Mount Gravatt',6,'QLD','m |
We can't make this file beautiful and searchable because it's too large.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "Pcode","Locality","State","Comments","DeliveryOffice","PresortIndicator","ParcelZone","BSPnumber","BSPname","Category" | |
| "0200","AUSTRALIAN NATIONAL UNIVERSITY","ACT","PO Boxes","AUSTRALIAN NATIONAL UNI LPO","150","N2 ","019","CANBERRA","Post Office Boxes " | |
| "0221","BARTON","ACT","LVR Special Mailing","CANBERRA SOUTH DC ","150","N2 ","019","CANBERRA","LVR " | |
| "0800","DARWIN","NT",,"DARWIN DELIVERY CENTRE","085","NT1","001","DARWIN","Delivery Area " | |
| "0801","DARWIN","NT","GPO Boxes","DARWIN GPO DELIVERY ANNEXE ","085","NT1","001","DARWIN","Post Office Boxes " | |
| "0804","PARAP","NT","PO Boxes","PARAP LPO ","085","NT1","001","DARWIN","Post Office Boxes " | |
| "0810","ALAWA","NT",,"DARWIN DELIVERY CENTRE","085","NT1","001","DARWIN","Delivery Area " | |
| "0810","BRINKIN","NT",,"DA |
OlderNewer