Skip to content

Instantly share code, notes, and snippets.

View pezholio's full-sized avatar

Stuart Harrison pezholio

  • Birmingham / London
View GitHub Profile
@pezholio
pezholio / gist:9189309
Created February 24, 2014 14:28
.powrc
if [ -f "$rvm_path/scripts/rvm" ]; then
source "$rvm_path/scripts/rvm"
rvm use .
fi
@pezholio
pezholio / all_constraints.csv
Last active August 29, 2015 13:57
all_constraints
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 5 columns, instead of 6. in line 5.
Username,Age,Height,Weight,Secret
,20,,,
derp,20,,,
derpderpington,20,,,
derp-derp,20,,,
derpina,20,,,,
derpina,25,,
derpette,4,,600,
grandderp,103,13,,
Scenario: API call returns pending initially
When I request a certificate via the API
And I request the results via the API
Then the API response should return pending
When the certificate is created
And I request the results via the API
Then the API response should return sucessfully
{
"saon": {
"name": "823 SALISBURY HOUSE"
},
"paon": {
"name": "29"
},
"street": {
"name": "FINSBURY CIRCUS",
"geometry": {
#!/bin/bash
for i in 2014-12-10-openaddressesuk*; do
open $i
cd ${i/\.zip//}
ls -a
for a in *.csv.zip; do
open $a
sed -i.bak 's/http:\/\/alpha\./http:\/\//g' *.csv/*.csv
sed -i.bak 's/http:\/\/alpha\./http:\/\//g' *.csv
require 'rubygems'
require 'httparty'
total = 0
success = 0
failure = 0
CSV.open("responses.csv") do |rows|
rows.each do |r|
response = HTTParty.post("http://sorting-office.openaddressesuk.org/address", body: {
E, [2015-02-13T13:04:17.546047 #223] ERROR -- : Hit error when running container: No such file or directory @ rb_sysopen - /data/output/draft/b/bacon/461/scraper.out
E, [2015-02-13T13:04:17.546150 #223] ERROR -- : /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/turbot-runner-0.1.18/lib/turbot_runner/runner.rb:94:in `initialize'
E, [2015-02-13T13:04:17.546244 #223] ERROR -- : /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/turbot-runner-0.1.18/lib/turbot_runner/runner.rb:94:in `open'
E, [2015-02-13T13:04:17.546316 #223] ERROR -- : /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/turbot-runner-0.1.18/lib/turbot_runner/runner.rb:94:in `process_script_output'
E, [2015-02-13T13:04:17.546377 #223] ERROR -- : /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/turbot-runner-0.1.18/lib/turbot_runner/runner.rb:41:in `process_output'
E, [2015-02-13T13:04:17.546455 #223] ERROR -- : /app/lib/turbot_docker_runner.rb:189:in `process_output'
E, [2015-02-13T13:04:17.546530 #223] ERROR -- : /app/lib/turbot_docker_runner.rb:35:in `
{
"bot_id": "test-address-bot",
"title": "My simple bot",
"description": "This is a simple bot",
"language": "ruby",
"data_type": "address",
"files": [
"scraper.rb"
],
"frequency": "monthly",
{
"bot_id": "now-you-was-just-the-kind-of-girl-to-break-my-heart-in-two",
"title": "My simple bot",
"description": "This is a simple bot",
"language": "ruby",
"data_type": "address",
"files": [
"scraper.rb"
],
"frequency": "monthly",
require 'test_helper'
class FlowchartsControllerTest < ActionController::TestCase
include Devise::TestHelpers
test "it sets defaults" do
get 'show'
assert assigns(:jurisdiction) == "gb"
assert assigns(:type) == "Practical"