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 gaxios = require('gaxios'); | |
const { GoogleAuth, JWT, Impersonated, ImpersonatedOptions } = require('google-auth-library'); | |
const { Storage } = require('@google-cloud/storage'); | |
const { SecretManagerServiceClient } = require('@google-cloud/secret-manager'); | |
// node -e 'require("./main").demo()' | |
// tsc -d -p /home/srashid/Desktop/node_impersonated/google-auth-library-nodejs/tsconfig.json | |
// cp -R /home/srashid/Desktop/node_impersonated/google-auth-library-nodejs/build/src/* node_modules/google-auth-library/build/src/ |
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
[ | |
{ "code": "aa", "name": "Afar" }, | |
{ "code": "ab", "name": "Abkhazian" }, | |
{ "code": "ae", "name": "Avestan" }, | |
{ "code": "af", "name": "Afrikaans" }, | |
{ "code": "ak", "name": "Akan" }, | |
{ "code": "am", "name": "Amharic" }, | |
{ "code": "an", "name": "Aragonese" }, | |
{ "code": "ar", "name": "Arabic" }, | |
{ "code": "as", "name": "Assamese" }, |
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 { S3Client, GetObjectCommand } = require('@aws-sdk/client-s3'); | |
const client = new S3Client({}); | |
const streamToString = (stream) => new Promise((resolve, reject) => { | |
const chunks = []; | |
stream.on('data', (chunk) => chunks.push(chunk)); | |
stream.on('error', reject); | |
stream.on('end', () => resolve(Buffer.concat(chunks).toString('utf8'))); | |
}); |
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 AWS = require('aws-sdk') | |
AWS.config.update({ region: process.env.AWS_REGION }) | |
const s3 = new AWS.S3() | |
const uploadBucket = 'test-bucket-357' // Replace this value with your bucket name! | |
const URL_EXPIRATION_SECONDS = 30000 // Specify how long the pre-signed URL will be valid for | |
// Main Lambda entry point | |
exports.handler = async (event) => { | |
return await getUploadURL(event) | |
} |
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
{ | |
"basics": { | |
"name": "Your first and last name", | |
"label": "", | |
"picture": "", | |
"email": "Your email address", | |
"phone": "A phone number, with any formatting you like. E.g. (555) 555-5555.", | |
"degree": "", | |
"website": "Your website URL", | |
"summary": "A one-sentence to one-paragraph overview text. Do not include any line-breaks.", |