Skip to content

Instantly share code, notes, and snippets.

View semprebon's full-sized avatar

Andrew Semprebon semprebon

View GitHub Profile
@semprebon
semprebon / gist:1595446
Created January 11, 2012 16:24
Dynspag Layer
{
"guid": "15fa1134cd6a24a5",
"title": "Hospitals",
"categoryFilter": null,
"url_type": null,
"extent": [ - 170.685669787886, -14.2903264751727, 145.724048653947, 71.2930611100571],
"info_window_filter": null,
"subtitle": "",
"geometry_types": ["point"],
"order": 1,
"dataset":{"connect":{"port":"5432","table":"test","type":"pg","db":"geoiqtestdb","host":"dbtest.geoiq.com","password":"password","user":"geoiqdbtester"},"overlay_data":{"feature_count":1000,"source":"finder:2134"}},"temporal":{"resolution":"month","attribute":"update"},"host":"http://geocommons.semprebon.local","attribute":"int_data","boundaries":["http://geocommons.semprebon.local/overlays/political_a/features.json","http://geocommons.semprebon.local/overlays/political_b/features.json"]}
{ '{"dataset":{"connect":{"port":"5432","table":"test","type":"pg","db":"geoiqtestdb","host":"dbtest.geoiq.com","password":"password","user":"geoiqdbtester"},"overlay_data":{"feature_count":1000,"source":"finder:2134"}},"temporal":{"resolution":"month","attribute":"update"},"host":"http://geocommons.semprebon.local","attribute":"int_data","boundaries":': { '"http://geocommons.semprebon.local/overlays/political_a/features.json","http://geocommons.semprebon.local/overlays/political_b/features.json"]': '' } }
{ redis_db: 0,
mongo_db: 'spa',
query_size: 500000,
worker: './workers/node_worker.js',
state: 'processing',
save: true,
'{"dataset":{"connect":{"port":"5432","table":"test","type":"pg","db":"geoiqtestdb","host":"dbtest.geoiq.com","password":"password","user":"geoiqdbtester"},"overlay_data":{"feature_count":1000,"source":"finder:2134"}},"temporal":{"resolution":"month","attribute":"update"},"host":"http://geocommons.semprebon.local","attribute":"int_data","boundaries":': { '"http://geocommons.se
{ suspicions_ip_analytic: {
title: "Suspicious IP",
counts: [
{ start_time: "2014-08-11 00:00:00", end_time: "2014-08-11 01:00:00", count: 10 },
{ start_time: "2014-08-11 01:00:00", end_time: "2014-08-11 02:00:00", count: 15 },
...]
},
listed_location_analytic: {
...
}
build(:service_event,
event_type: Event::USER_SUBJECT_MAPPING, action: Event::UPDATED,
identifier: "okta_id_001", service: identity_service,
complete: complete,
parameters: { related_identifier: "box_id_001",
mapping_identifier: "box" })
}
25 locations computed in 36.886 seconds
Found: (adobe offices within 100 mi of operating location)
[:san_jose, :san_fran, :delhi, :lehi, :seattle, :tokyo, :london, :hamburg, :paris, :arlington_mclean, :new_york, :basel, :seoul, :sao_paulo, :moldova]
All operating loctions found:
[location, radius, number of location, nearest adobe office, distance to adobe office]
[[-118.20598467988565, 33.99849543788449], 50, 147, :san_jose, 295]
[[-46.6361, -23.547499999999996], 50, 7, :sao_paulo, 0]
[[-115.14120570960752, 36.10976359376279], 50, 17, :lehi, 338]
@semprebon
semprebon / gist:cc42d871301148e69937
Created July 23, 2015 20:34
Service section of config.yml - not added show_process_data attribute
service:
- name: torquebox
description: Torquebox/Interlock
dependencies:
- "${INTERLOCK_HOME}/admin_app/examples/interlock-knob.yml"
- "${INTERLOCK_HOME}/admin_app/examples/https.jks"
- "${INTERLOCK_HOME}/admin_app/examples/standalone.xml"
restart: ${COMMAND_DIR}/restart_torquebox.sh ${ADMIN_APP_ROOT}/tmp/interlock-knob.yml
status: ${COMMAND_DIR}/status_torquebox.sh ${ADMIN_APP_ROOT}/tmp/interlock-knob.yml
async: true
security:
authn_requests_signed: true
embed_sign: true
certificate: |-
-----BEGIN CERTIFICATE-----
certificate goes here
-----END CERTIFICATE-----
private_key: |-
-----BEGIN PRIVATE KEY-----
private key goes here
---
application:
root: /mnt/hgfs/Development/ms7/sentry/sentry_server
environment:
RACK_ENV: development
TorqueBox.configure do
ruby do
version "1.9"
compile_mode "jit"
debug false
interactive false
profile_api false
end