This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Readable } = require('node:stream'); | |
const DocumentSource = require('./documentsource'); | |
module.exports = class DocumentClientQueryReadable extends Readable { | |
constructor (client, params) { | |
super({ objectMode: true }); | |
this.source = new DocumentSource(client, params); | |
this.source.on('data', this.onData.bind(this)); | |
this.source.on('end', this.onEnd.bind(this)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const arc = require('@architect/functions'); | |
const { GetObjectCommand, S3Client } = require('@aws-sdk/client-s3'); | |
const { Upload } = require('@aws-sdk/lib-storage'); | |
const client = new S3Client({}); | |
const CONSTANTS = require('@architect/shared/constants'); | |
const { timer } = require('@architect/shared/utils'); | |
const jsonlines = require('@jsonlines/core') | |
const stream = require('stream'); | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Some user-defined parameters based on primitive types | |
type BaseParamDefinition<N, T> = { type: N; default: T }; | |
type BooleanParamDefinition = BaseParamDefinition<"boolean", boolean>; | |
type StringParamDefinition = BaseParamDefinition<"string", string>; | |
type NumberParamDefinition = BaseParamDefinition<"number",number>; | |
// A more complex parameter type: an object, with inputs, and an array that specifies which of the inputs are required. | |
type ObjectParamDefinition< | |
Inputs extends ParameterSetDefinition<PrimitiveParameterDefinition>, | |
RequiredInputs extends RequiredProperties<Inputs>, | |
> = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "axios-repro", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "DEBUG=nock.scope* mocha test.js" | |
}, | |
"keywords": [], | |
"author": "", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { App } = require('@slack/bolt'); | |
// Initializes your app with your bot token and signing secret | |
const app = new App({ | |
token: process.env.SLACK_BOT_TOKEN, | |
signingSecret: process.env.SLACK_SIGNING_SECRET, | |
socketMode: true, | |
appToken: process.env.SLACK_APP_TOKEN | |
}); | |
// Listens to incoming messages that contain "hello" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const queue = 'MyDopeassQueue'; | |
const dlq = `${queue}DLQ`; | |
module.exports = function queueCustomizer (arc, cloudformation) { | |
cloudformation.Resources[queue] = { | |
Type: 'AWS::SQS::Queue', | |
DependsOn: dlq, | |
Properties: { | |
MessageRetentionPeriod: 1209600, // max (14 days) | |
ReceiveMessageWaitTimeSeconds: 20, // enable long polling when asking for messages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let fs = require('fs'); | |
const INDEX_HTML = 'public/index.html'; | |
const INDEX_ROUTE = 'src/http/get-index/index.js'; | |
let html = fs.readFileSync(INDEX_HTML).toString(); | |
let route = fs.readFileSync(INDEX_ROUTE).toString(); | |
route = route.replace(/`.*`/, '`' + html + '`'); // replace everything between two backticks with index.html. that's my sophisticated templating engine! | |
console.log('\nOverwriting index route to return new index.html...'); | |
fs.writeFileSync(INDEX_ROUTE, route, 'utf-8'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = { | |
// Application Constructor | |
initialize: function() { | |
document.addEventListener('deviceready', this.onDeviceReady.bind(this), false); | |
}, | |
// deviceready Event Handler | |
// | |
// Bind any cordova events here. Common events are: | |
// 'pause', 'resume', etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➔ tox | |
python installed: EasyProcess==0.2.3,html5lib==0.999999999,py==1.4.34,pytest==3.1.3,PyVirtualDisplay==0.2.1,selenium==3.4.3,six==1.10.0,webencodings==0.5.1 | |
python runtests: PYTHONHASHSEED='1711188449' | |
python runtests: commands[0] | pytest -vv tests | |
===================================================================== test session starts ===================================================================== | |
platform darwin -- Python 2.7.13, pytest-3.1.3, py-1.4.34, pluggy-0.4.0 -- /Users/maj/src/web-platform-tests/resources/test/.tox/python/bin/python2.7 | |
cachedir: .cache | |
rootdir: /Users/maj/src/web-platform-tests/resources/test, inifile: | |
collected 36 items |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➔ tox | |
python installed: EasyProcess==0.2.3,html5lib==0.999999999,py==1.4.34,pytest==3.1.3,PyVirtualDisplay==0.2.1,selenium==3.4.3,six==1.10.0,webencodings==0.5.1 | |
python runtests: PYTHONHASHSEED='1297519254' | |
python runtests: commands[0] | pytest -vv tests | |
===================================================================== test session starts ===================================================================== | |
platform darwin -- Python 2.7.13, pytest-3.1.3, py-1.4.34, pluggy-0.4.0 -- /Users/maj/src/web-platform-tests/resources/test/.tox/python/bin/python2.7 | |
cachedir: .cache | |
rootdir: /Users/maj/src/web-platform-tests/resources/test, inifile: | |
collected 36 items |
NewerOlder