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
addEventListener('fetch', event => { | |
event.respondWith(fetchAndCheckPassword(event.request)) | |
}) | |
async function fetchAndCheckPassword(req) { | |
if (req.method == "POST") { | |
try { | |
const post = await req.formData(); | |
const pwd = post.get('password') | |
const enc = new TextEncoder("utf-8").encode(pwd) |
GitHub's documentation has caught up with the provided features and became a lot better: https://docs.github.com/en/actions
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
/* | |
* Infinite Scroll using Remix Run | |
* Based on client-side Scroll position | |
* Full Article here: https://dev.to/ptenteromano/infinite-scroll-with-remix-run-1g7 | |
*/ | |
import { useEffect, useState, useCallback } from "react"; | |
import { LoaderFunction, useLoaderData, useFetcher } from "remix"; | |
import { fetchPhotos } from "~/utils/api/restful"; | |
import type { PhotoHash } from "~/utils/api/types"; |
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 { createRequestHandler } from "./streaming-lambda.ts"; | |
import * as build from "@remix-run/dev/server-build"; | |
export const handler = awslambda.streamifyResponse( | |
createRequestHandler({ | |
build, | |
mode: process.env.NODE_ENV, | |
}) | |
); |
This will automatically use CUID2 for all id
fields when creating elements in Prisma.
You'll need to add the following libraries to make this work
npm install --save @paralleldrive/cuid2 immer
yarn add @paralleldrive/cuid2 immer
pnpm add @paralleldrive/cuid2 immer
OlderNewer