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 layout = require('@architect/shared/layout') | |
const arc = require('@architect/functions') | |
exports.handler = arc.http.async(handler) | |
// @ts-ignore | |
async function handler(req) { | |
const isLoggedIn = !!req.session.email | |
if(isLoggedIn) { |
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
{ | |
"New tape test": { | |
"scope": "javascript,typescript", | |
"prefix": "tttest", | |
"body": [ | |
"test('$1', (t) => {", | |
"\t$0", | |
"\tt.end()", | |
"})" | |
] |
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
Show hidden characters
{ | |
"include": [ | |
"src/**/*.js", | |
"test/**/*.js" | |
], | |
"compilerOptions": { | |
/* Basic Options */ | |
"target": "ES2017", | |
"lib": ["ESNext.Array"], | |
"module": "commonjs", |
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
// Copy and paste it into Chrome devtools console to run it | |
let cliParser = (args) => { | |
let keyValueList = [] | |
let keyBucket = [] | |
let valueBucket = [] | |
let isKey = false | |
let isInsideQuote = false | |
args += '-' //to add last key value pair | |
args.split('').forEach(x =>{ | |
// console.log('Processing', x) |
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
sudo yum update -y && \ | |
sudo yum remove awscli -y && \ | |
sudo rm /usr/local/bin/sam && \ | |
sudo rm -rf /usr/local/aws-sam-cli | |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ | |
unzip awscliv2.zip && \ | |
sudo ./aws/install && \ | |
wget https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip && \ | |
unzip aws-sam-cli-linux-x86_64.zip -d sam-installation && \ | |
sudo ./sam-installation/install && \ |
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
This template.yaml file | |
# snip | |
- StepFunctionsExecutionPolicy: # Manually change to StartSyncExection after deployment | |
StateMachineName: | |
!Ref ProcessImageStateMachineExpressSync | |
# snip | |
generates this role |
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
openapi: "3.0.1" | |
info: | |
title: "Api for processImage step func" | |
version: "2020-11-06 15:32:29UTC" | |
paths: | |
/: | |
post: | |
responses: | |
default: | |
description: "Default response for POST /" |
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
<html> | |
<body> | |
<button type="submit" onclick="submit();">Submit</button> | |
</body> | |
<script> | |
function submit(){ | |
fetch("<api_url>", { |
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
# Simple SAM template with CORS configuration for an image processor lambda | |
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Description: > | |
test | |
Sample SAM Template for test | |
Globals: | |
Function: |
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
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> | |
</head> | |
<body> | |
<p>Web Components Demo | |
<div> | |
<button is="hey-there-button" name="World">Howdy</button> | |
</div> |
NewerOlder