I hereby claim:
- I am mdlavin on github.
- I am mdlavin (https://keybase.io/mdlavin) on keybase.
- I have a public key whose fingerprint is CBA7 40DB B828 D263 1049 22DF 08A6 8D0C 1C04 C39A
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| # If your AWS account has a lot of subnets and you want to have an SSH config entry for all of the subnets, then | |
| # building the Hosts line by hand can be quite cumbersome. This script will automatically fetch the subnets | |
| # from AWS for your account and build a Hosts line with wildcards to cover all of the IP ranges | |
| ALL="" | |
| for CIDR in `aws ec2 describe-subnets --query Subnets[].CidrBlock --output text`; do | |
| #echo $CIDR | |
| HOST_MIN=$(ipcalc $CIDR | ggrep -Po '(?<=HostMin:)[ ]*([^ ]*)' | sed 's/ //g') |
| var request = require('./index'); | |
| const http = require('http'); | |
| const Promise = require('bluebird'); | |
| const v8 = require('v8'); | |
| const memwatch = require('memwatch-next'); | |
| const _ = require('lodash'); | |
| var triggerResponseSend; | |
| const readyToRespond = new Promise( (resolve) => { | |
| triggerResponseSend = resolve; |
| const memwatch = require('memwatch-next'); | |
| const _ = require('lodash'); | |
| const zlib = require('./lib/zlib'); | |
| function writeLeakDiff(diff) { | |
| const closures = _.filter(diff.change.details, {what: 'Closure'}); | |
| console.log('Closure changes', closures); | |
| const buffers = _.filter(diff.change.details, {what: 'Uint8Array'}); | |
| console.log('Uint8Array changes', buffers); |
| const xray = require('aws-xray-sdk-core'); | |
| // Allow X-Ray to track execution through API API calls | |
| xray.captureAWS(require('aws-sdk')); | |
| // Allow X-Ray to track execution through external API calls | |
| xray.captureHTTPsGlobal(require('http')); | |
| // Allow X-Ray to track execution when Promises are used | |
| xray.capturePromise(); |
| const traceResolvers = require('@lifeomic/graphql-resolvers-xray-tracing'); | |
| const schema = makeExecutableSchema( ... ); | |
| traceResolvers(schema); |
| resource "aws_lambda_function" "service" { | |
| # Your usual aws_lambda_function configuration settings here | |
| tracing_config { | |
| mode = "Active" | |
| } | |
| } |
| exports.returnNull = function (event, context, callback) { | |
| callback(null, null); | |
| } |
| const result = await lambda.invoke(request).promise(); | |
| const payload = JSON.parse(result.Payload); | |
| const body = payload.body; |
| export.handler = function (evt, ctx, callback) { | |
| Promise.resolve() | |
| .then(() => { | |
| const koaRequest = convertToKoaRequest() | |
| return myAppResponseHandler(koaRequest); | |
| }) | |
| .then(koaResponse => { | |
| callback(null, { | |
| statusCode: koaResponse.statusCode | |
| headers: getHeaders(koaResponse) |