Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-93-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Tue Aug 23 17:35:20 UTC 2016
System load: 1.03 Processes: 107
Usage of /: 3.5% of 39.34GB Users logged in: 0
Memory usage: 6% IP address for eth0: 10.0.2.15
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
def decrypt_session_cookie(cookie, key) | |
cookie = CGI::unescape(cookie) | |
# Default values for Rails 4 apps | |
key_iter_num = 1000 | |
salt = "encrypted cookie" | |
signed_salt = "signed encrypted cookie" | |
key_generator = ActiveSupport::KeyGenerator.new(key, iterations: key_iter_num) | |
secret = key_generator.generate_key(salt) |
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
WITH last_response_times AS ( | |
SELECT events.info_request_id, MAX(events.created_at) AS last_response_time | |
FROM info_request_events events | |
JOIN incoming_messages | |
ON incoming_messages.id = events.incoming_message_id | |
WHERE | |
events.event_type = 'response' AND | |
incoming_messages.prominence = 'normal' | |
GROUP BY events.info_request_id | |
) |
I hereby claim:
- I am lizconlan on github.
- I am lizconlan (https://keybase.io/lizconlan) on keybase.
- I have a public key whose fingerprint is A37A 4153 EC35 E827 F426 E742 80A9 5F5D 8567 B2DE
To claim this, I am signing this object:
To re-run the Hansard parser to attempt to pick up old files which may have been skipped previously:
[if in the UK, change your DNS servers to 8.8.8.8 and 8.8.4.4 (i.e. Google) to get a more stable connection]
Delete old sources from the database which refer to the old parliament.go.ke site:
# check to see whether there are any and how many
SELECT COUNT(*) FROM hansard_source WHERE last_processing_success IS NULL AND url LIKE '%/plone/%';
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
{ | |
Gap = 0; | |
LineGap = 0.5; | |
Name = CrowFilledBall; | |
Filled = YES; | |
Path = { | |
elements = ( | |
{element = MOVETO; point = "{0, 0}"; }, | |
{element = LINETO; point = "{12, 0}"; }, | |
{element = CLOSE; }, |
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 'nokogiri' | |
require 'net/http' | |
require 'rest_client' | |
require 'uri' | |
require 'json' | |
def format_member_name(input) | |
return "" if input.nil? |
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
function(newDoc, oldDoc, userCtx) { | |
if (userCtx.roles.indexOf('_admin') !== -1) { | |
return; | |
} else { | |
throw({forbidden: 'Only admins may edit the database'}); | |
} | |
} |
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
sudo apt-get install git-core | |
sudo apt-get install ruby | |
sudo apt-get install mysql-server | |
sudo apt-get install build-essential | |
sudo apt-get install libopenssl-ruby | |
sudo apt-get install ruby1.8-dev | |
sudo apt-get install rubygems | |
sudo apt-get install couchdb | |
sudo apt-get install jedit |
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
javascript:(function(){readStyle='style-novel';readSize='size-medium';readMargin='margin-wide';_readability_script=document.createElement('SCRIPT');_readability_script.type='text/javascript';_readability_script.src='http://lab.arc90.com/experiments/readability/js/readability.js?x='+(Math.random());document.getElementsByTagName('head')[0].appendChild(_readability_script);_readability_css=document.createElement('LINK');_readability_css.rel='stylesheet';_readability_css.href='http://lab.arc90.com/experiments/readability/css/readability.css';_readability_css.type='text/css';_readability_css.media='all';document.getElementsByTagName('head')[0].appendChild(_readability_css);_readability_print_css=document.createElement('LINK');_readability_print_css.rel='stylesheet';_readability_print_css.href='http://lab.arc90.com/experiments/readability/css/readability-print.css';_readability_print_css.media='print';_readability_print_css.type='text/css';document.getElementsByTagName('head')[0].appendChild(_readability_print_css) |
NewerOlder