I hereby claim:
- I am coreylight on github.
- I am coreylight (https://keybase.io/coreylight) on keybase.
- I have a public key whose fingerprint is 0B14 3F54 F066 89EB F0DD BCA3 1581 5DAE 3C9B 9FD7
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| curl 'https://api.opsee.com/graphql' -H 'Pragma: no-cache' -H 'Origin: https://app.opsee.com' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.8' -H 'authorization: $OPSEE_TOKEN' -H 'content-type: application/json' -H 'Accept: */*' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36' -H 'Cache-Control: no-cache' -H 'Referer: https://app.opsee.com/' -H 'Connection: keep-alive' --data-binary '{"query":"{\n checks {\n \tid\n notifications {\n value\n type\n }\n target {\n address\n name\n type\n id\n }\n name\n min_failing_time\n min_failing_count\n response_count\n state\n spec {\n ... on schemaHttpCheck {\n verb\n protocol\n |
| const uuid = require('uuid'); | |
| exports.handler = (event, context, callback) => { | |
| const response = { | |
| statusCode: 200, | |
| body: JSON.stringify({ | |
| message: 'Your uuid is: ' + uuid.v4(), | |
| input: event | |
| }) | |
| }; | |
| callback(null, response); |
| const uuid = require('uuid'); | |
| const iopipe = require('iopipe')({token: 'TOKEN'}); | |
| exports.handler = iopipe((event, context, callback) => { | |
| const response = { | |
| statusCode: 200, | |
| body: JSON.stringify({ | |
| message: 'Your uuid is: ' + uuid.v4(), | |
| input: event | |
| }) | |
| }; |
| const shift = require('jscodeshift'); | |
| const code = 'The string literal of the code to transform (from above)'; | |
| const searchObject = { | |
| left: { | |
| type: 'MemberExpression', | |
| object: { | |
| type: 'Identifier', | |
| name: 'exports' | |
| }, | |
| property: { |
| exports.handler = //anything here |
| exports | |
| .handler = // 😎 this will work too |
| const wrapper = "require('iopipe')({token: 'TOKEN'})(REPLACE)"; | |
| shift(wrapper) | |
| .find(shift.Identifier, { | |
| name: 'REPLACE' | |
| }) | |
| .replaceWith(found); |
| const iopipeLib = require('iopipe'); | |
| const tracePlugin = require('iopipe-plugin-trace'); | |
| const iopipe = iopipeLib({ | |
| plugins: [tracePlugin()] | |
| }); | |
| // wrap your lambda handler | |
| exports.handler = iopipe((event, context) => { | |
| const mark = context.iopipe.mark; |
| const startTime = process.hrtime(); | |
| await runTheDatabaseCall(); | |
| const endTime = process.hrtime(startTime); | |
| console.log(endTime); | |
| // [ 8, 210181641 ] |