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
npm install @embrace-io/react-native @embrace-io/react-native-otlp |
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
npx @react-native-community/cli init Walkthrough | |
cd Walkthrough/ios | |
bundle install | |
bundle exec pod install | |
cd .. | |
npx react-native run-ios |
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
resource "aws_s3_bucket" "notes" { | |
bucket = "${var.bucket_name}-${random_id.bucket_id.hex}" | |
} | |
resource "aws_lambda_function" "handler" { | |
function_name = "${var.service_name}-${var.stack_id}" | |
role = aws_iam_role.role.arn | |
image_uri = "${aws_ecr_repository.repo.repository_url}@${docker_registry_image.push.sha256_digest}" | |
package_type = "Image" | |
timeout = var.timeout |
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
from nitric.application import Nitric | |
from nitric.resources import api, bucket | |
from nitric.context import HttpContext | |
main = api("main") | |
notes = bucket("notes").allow("read", "write") | |
@main.get("/notes/:title") | |
async def get_note(ctx: HttpContext): | |
title = ctx.req.params["title"] |
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
resource "aws_s3_bucket" "notes" { | |
bucket = "notes-bucket" | |
} | |
resource "aws_lambda_function" "handler" { | |
function_name = "notes_handler" | |
runtime = "python3.9" | |
handler = "handler.lambda_handler" | |
role = aws_iam_role.lambda_exec.arn | |
source_code_hash = filebase64sha256("lambda.zip") |
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
resource "aws_iam_policy" "lambda_s3" { | |
name = "lambda_s3_policy" | |
policy = jsonencode({ | |
Version = "2012-10-17", | |
Statement = [{ | |
Effect = "Allow", | |
Action = ["s3:GetObject", "s3:PutObject"], | |
Resource = "${aws_s3_bucket.example.arn}/*" | |
}] | |
}) |
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
resource "aws_s3_bucket" "example" { | |
bucket = "example-bucket" | |
} | |
resource "aws_lambda_function" "example" { | |
function_name = "example_lambda" | |
s3_bucket = aws_s3_bucket.example.bucket | |
s3_key = "lambda_function.zip" | |
handler = "index.handler" | |
runtime = "python3.8" |
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
overlay: 1.0.0 | |
info: | |
title: Add MIT license | |
version: 1.0.0 | |
actions: | |
- target: '$.info' | |
update: | |
license: | |
name: MIT | |
url: https://opensource.org/licenses/MIT |
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
<script setup> | |
const props = defineProps({ | |
results: Array, | |
totalCorrect: Number, | |
questionsAnswered: Number, | |
}); | |
const resultIndex = computed(() => { | |
let index = 0; | |
props.results.findIndex((e, i) => { |
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
… | |
<template> | |
<main> | |
<div class="ctr"> | |
… | |
<Result | |
v-else | |
:results="results" | |
:totalCorrect="totalCorrect" |