Skip to content

Instantly share code, notes, and snippets.

View beckyconning's full-sized avatar

Becky Conning beckyconning

View GitHub Profile
[PKey "orders", PIndex 0, PKey "lineItems", PIndex 0, PKey "id"]
[PKey "orders", PIndex 0, PKey "lineItems", PIndex 1, PKey "id"]
[PKey "orders", PIndex 0, PKey "id"]
[PKey "orders", PIndex 1, PKey "lineItems", PIndex 0, PKey "id"]
[PKey "orders", PIndex 1, PKey "lineItems", PIndex 1, PKey "id"]
[PKey "orders", PIndex 1, PKey "id"]
--
[ZKey "orders", ZIndex, ZKey "lineItems", ZIndex]
@beckyconning
beckyconning / _.md
Created July 13, 2020 20:20
Multiple Java versions on Mac
@beckyconning
beckyconning / index.js
Created June 17, 2020 14:49
Lambda function that writes web-hooks to S3. You will also need to set up an API gateway to trigger this function.
var AWS = require('aws-sdk');
var s3 = new AWS.S3();
var uuidv4 = function() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random() * 16 | 0,
v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
}
2020-05-22 22:03:09,198 ERROR [blaze-selector-7] (Http1ServerStage.scala:279) - Error writing body
quasar.connector.ResourceError$ResourceErrorException: MalformedResource(path: ResourcePath(/projects/0.json.gz), expected: ldjson, detail: Some("exhausted input"))
tectonic.IncompleteParseException: exhausted input
at quasar.connector.ResourceError$.$anonfun$throwableP$1(ResourceError.scala:124) ~[quasar-connector_2.12-169.1.0.jar:169.1.0]
at monocle.Prism$$anon$7.reverseGet(Prism.scala:295) ~[monocle-core_2.12-1.6.0.jar:1.6.0]
at monocle.PPrism.apply(Prism.scala:244) ~[monocle-core_2.12-1.6.0.jar:1.6.0]
at quasar.mimir.evaluate.FederatedReadPlanner.$anonfun$tableFromTyped$3(FederatedReadPlanner.scala:208) ~[mimir_2.12-176.1.0.jar:176.1.0]
at scala.Option.fold(Option.scala:251) ~[scala-library-2.12.11.jar:?]
at quasar.mimir.evaluate.FederatedReadPlanner.$anonfun$tableFromTyped$1(FederatedReadPlanner.scala:208) ~[mimir_2.12-176.1.0.jar:176.1.0]
at quasar.mimir.evaluate.FederatedReadPlanner.$anonfun$tableF
#!/bin/bash
set -e
set -o pipefail
BASE_URL=$1
TABLES_URL="${BASE_URL}/api/tables"
DESTINATIONS_URL="${BASE_URL}/api/destinations"
{ "a": { "x": 1, "y": 2 }, "b": { "x": 2, "y": 2 } }
{ "next": 1093890418029038, "data": 1 }
{ "a": 1 }
next=$({ curl -v 'https://api.fda.gov/animalandveterinary/event.json?limit=100&api_key=PGLbKWdpoZh6XOTE8kGSuL2Ket5ClAFziohrdPQx' 2>&1 1>>example | perl -0777 -ne 'print "$&\n" if /(?:(?!<).)*?(?=>; rel="next")/'; }) && while [ "$next" != "" ]; do next=$({ curl -v "$next" 2>&1 1>>example | perl -0777 -ne 'print "$&\n" if /(?:(?!<).)*?(?=>; rel="next")/'; }); done