Skip to content

Instantly share code, notes, and snippets.

{
"swagger": "2.0",
"info": {
"title": "Geocoder REST API",
"description": "This API computes the physical locations (i.e., latitude and longitude) and correct, standardized forms of civic and non-civic addresses in British Columbia. Please see our <a href=https://github.com/bcgov/api-specs/blob/master/COLLECTION_NOTICE.md#collection-notice target=\"_blank\">data collection notice</a>",
"version": "2.0.0",
"license": {
"name": "Open Government License - British Columbia",
"url": "http://www2.gov.bc.ca/gov/content/governments/about-the-bc-government/databc/open-data/open-government-license-bc"
},
@ll911
ll911 / bctm.json
Last active August 11, 2016 00:48
{"corsDomains":["data.gov.bc.ca","ga.gov.au","openmaps.gov.bc.ca","maps.gov.bc.ca"],"homeCamera":{"west":65,"south":-99,"east":45,"north":-150},"services":[],"catalog":[{"name":"Provincial Datasets CKAN","type":"ckan","url":"https://catalogue.data.bc.ca","filterQuery":["q=&res_format=wms","q=&res_format=wfs"],"filterByWmsGetCapabilities":false,"minimumMaxScaleDenominator":10000000000,"wmsParameters":{"tiled":true},"blacklist":{}},{"name":"Data Providers","type":"group","items":[{"name":"Topography (ESRI)","description":"[Licence](https://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServe)","dataCustodian":"[ESRI](https://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServe)","url":"https://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer","type":"esri-mapServer"},{"name":"Water (Bureau of Meteorology Geofabric)","description":"[Licence](http://creativecommons.org/licenses/by/3.0/au/)","dataCustodian":"[Australian Bureau of Meteorology](http://www.bo
{"corsDomains":["data.gov.bc.ca","ga.gov.au","openmaps.gov.bc.ca","maps.gov.bc.ca"],"homeCamera":{"west":65,"south":-99,"east":45,"north":-150},"services":[],"catalog":[{"name":"Provincial Datasets CKAN","type":"ckan","url":"https://cat.data.gov.bc.ca","filterQuery":["q=res_format:wms","q=res_format:csv"],"filterByWmsGetCapabilities":false,"wmsParameters":{"tiled":true},"blacklist":{}},{"name":"Data Providers","type":"group","items":[{"name":"Topography (ESRI)","description":"[Licence](https://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServe)","dataCustodian":"[ESRI](https://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServe)","url":"https://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer","type":"esri-mapServer"},{"name":"police-jurisdiction-boundaries (RCMP)","description":"[Licence](http://www2.gov.bc.ca/gov/admin/copyright.page)","dataCustodian":"[Royal Canadian Mounted Police](https://catalogue.data.gov.bc.ca/organization/royal-canadian-mo
proxy_redirect off;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Connection "";
proxy_http_version 1.1;
if ($http_origin ~* (https?://.*\.apps\.gov\.bc\.ca(:[0-9]+)?$)) {
set $cors "1";
@ll911
ll911 / curl_report.md
Created May 9, 2017 21:10
curl time report

vi /tmp/tm

    time_namelookup:  %{time_namelookup}\n
       time_connect:  %{time_connect}\n
    time_appconnect:  %{time_appconnect}\n
   time_pretransfer:  %{time_pretransfer}\n
      time_redirect:  %{time_redirect}\n
 time_starttransfer:  %{time_starttransfer}\n
                    ----------\n
 time_total: %{time_total}\n
@ll911
ll911 / comparison.md
Created June 8, 2017 02:56
service benmark

simulation of 12 threads, 400 connections for 30 seconds, target as

Thread Stats KGeocoder(nj) AGeocoder(aj) BCDC(np) MPCM(aj) GeoSever(aj) MapServer(ac) AGS(ic#)
Latency 62.71ms 368.89ms 101.24ms 647.23ms 135.53ms 321.87ms 114.32ms
timeout 0 19 55 986 1838 1324 89
Socket errors 0 23 0 0 2 1 0
Transfer/sec 12.08MB 287.12KB 2.38MB 130.13KB 2.36MB 1.72MB 2.34MB
Requests/sec 6013.46 827.65 4420.43 39.74 273.87 173.86 950.08
@ll911
ll911 / CreateJob.sh
Created September 20, 2017 16:17 — forked from stuart-warren/CreateJob.sh
Create a job in Jenkins (or folder) using the HTTP API
# check if job exists
curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user user.name:YourAPIToken
# with folder plugin
curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken
# without folder plugin
curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken
# create folder
apiVersion: v1
kind: Template
labels:
template: nexus3-persistent-template
metadata:
name: nexus3-persistent
annotations:
description: Sonatype Nexus 3 persistent template
tags: ci,nexus
objects:
@ll911
ll911 / mongodb-clustered.json
Last active September 30, 2017 00:17
mongodb-ocp-replicaset
{ "kind": "Template", "apiVersion": "v1", "metadata": { "name": "mongodb-replica-example", "annotations": { "description": "MongoDB Replication Example", "iconClass": "icon-mongodb", "tags": "database,mongodb,replication" } }, "labels": { "template": "mongodb-replica-example" }, "parameters": [ { "name": "MONGODB_USER", "description": "The username for MongoDB account to be created", "generate": "expression", "from": "[a-zA-Z0-9]{3}" }, { "name": "MONGODB_PASSWORD", "description": "Password for the MongoDB user account", "generate": "expression", "from": "[a-zA-Z0-9]{12}" }, { "name": "MONGODB_DATABASE", "description": "Name for the MongoDB database", "value": "sampledb" }, { "name": "MONGODB_ADMIN_PASSWORD", "description": "Password for the MongoDB admin user", "generate": "expression", "from": "[a-zA-Z0-9]{12}" }, { "name": "MONGODB_REPLICA_NAME", "description": "The name of the replica set", "value": "rs0" }, { "name": "MONGODB_SERVICE_NAME", "description": "The name of the MongoDB Service (used to DNS loo
apiVersion: v1
kind: Template
metadata:
annotations:
description: Cassandra cluster with no persistence (EXPERIMENTAL)
tags: cassandra, cluster, no production, experimental
iconClass: icon-database
name: cassandra-cluster-experimental
objects:
- apiVersion: v1