This file contains hidden or 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
function httpFiFoRequestsExecutor({ | |
onTaskSuccess, | |
onTaskFail, | |
}) { | |
async function* execute(taskInfos, props) { | |
const { | |
taskIdentifier, | |
taskFn | |
} = taskInfos || {}; | |
try { |
This file contains hidden or 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 {spawnSync} = require('child_process') | |
const inquirer = require('inquirer') | |
const glob = require('glob') | |
async function go() { | |
const files = glob | |
.sync('src/+(exercise|final)/*.+(js|ts|tsx)', { | |
ignore: ['*.d.ts'], | |
}) | |
.map(f => f.replace(/^src\//, '')) |
This file contains hidden or 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
MIT License | |
Copyright (c) 2021 Daniel Ethridge | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains hidden or 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
// three indices to efficiently support all lookups | |
function createDB() { | |
return {eav: new Map(), | |
ave: new Map(), | |
vea: new Map()}; | |
} | |
function addToIndex(xs, x, y, z, triple) { | |
let ys = xs.get(x); | |
if(ys == undefined) { |
This file contains hidden or 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
curl -L https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip -o aws-sam-cli-linux-x86_64.zip | |
unzip aws-sam-cli-linux-x86_64.zip -d sam-installation | |
sudo ./sam-installation/install | |
where sam | |
sam --version |
This file contains hidden or 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
<!-- | |
When an input element gets focused, iOS Safari tries to put it in the center by scrolling (and zooming.) | |
Zooming can be easily disabled using a meta tag, but the scrolling hasn't been quite easy. | |
The main quirk (I think) is that iOS Safari changes viewport when scrolling; i.e., toolbars shrink. | |
Since the viewport _should_ change, it thinks the input _will_ move, so it _should_ scroll, always. | |
Even times when it doesn't need to scroll—the input is fixed, all we need is the keyboard— | |
the window always scrolls _up and down_ resulting in some janky animation. | |
However, iOS Safari doesn't scroll when the input **has opacity of 0 or is completely clipped.** |
This file contains hidden or 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
AWSTemplateFormatVersion: 2010-09-09 | |
Parameters: | |
env: | |
Type: String | |
authCognitoResourceUserPoolId: | |
Type: String | |
Mappings: | |
CustomAuthDomains: |
This file contains hidden or 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
import awsconfig from "./aws-exports"; | |
import Amplify from "@aws-amplify/core"; | |
// Find the User Pool ID for your production deployment in | |
// the AWS Console | |
if (awsconfig.aws_user_pools_id === "us-east-1_M7n6RNrq9") { | |
awsconfig.oauth.domain = "auth.yourdomain.com; | |
} | |
Amplify.configure(awsconfig); |
This file contains hidden or 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
// connect route | |
const apigatewayroutesocketconnect = new apigateway.CfnRoute(this, "apigatewayroutesocketconnect", { | |
apiId:apigatewaysocket.ref, | |
routeKey: "$connect", | |
authorizationType: "AWS_IAM", | |
apiKeyRequired: false, | |
operationName: "ConnectRoute", | |
target: "integrations/"+new apigateway.CfnIntegration(this, "apigatewayintegrationsocketconnect", { | |
apiId: apigatewaysocket.ref, | |
integrationType: "AWS_PROXY", |
This file contains hidden or 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
node_modules |