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
❯ lib/navigation.test.ts (35) | |
❯ valid input (33) | |
✓ navigates "valid-handle.com" to "/at/valid-handle.com" | |
✓ navigates "at://valid-handle.com" to "/at/valid-handle.com" | |
× navigates "valid-handle.com/collection" to "/at/valid-handle.com/collection" | |
✓ navigates "at://valid-handle.com/collection" to "/at/valid-handle.com/collection" | |
× navigates "valid-handle.com/collection/rkey" to "/at/valid-handle.com/collection/rkey" | |
✓ navigates "at://valid-handle.com/collection/rkey" to "/at/valid-handle.com/collection/rkey" | |
× navigates "valid-handle.com/collection/rkey" to "/at/valid-handle.com/collection/rkey" | |
✓ navigates "at://valid-handle.com/collection/rkey" to "/at/valid-handle.com/collection/rkey" |
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
function wrapWithSignal(ms, fn) { | |
const signal = AbortSignal.timeout(ms) | |
return fn(signal) | |
} | |
function foo() { | |
return wrapWithSignal(signal => fetch("/", {signal})) | |
} | |
try { |
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
The following is text converted from an email received from Aiven support using OCR software: | |
Hello: | |
Aiven recently experienced an internal security issue which has been remediated. | |
However, we require some additional action from affected customers. | |
What went wrong | |
When enabling multi-factor authentication in the Aiven console, there is a modal | |
pop-up on s.creen asking for the user to supply their password. After entering the | |
password, if the user pressed the "Enter" key instead ot clicking on the "Next" | |
button, the value of the password field was sent as a GET parameter alongside |
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
{ | |
"Next.js Layout": { | |
"prefix": "nextjs-layout", | |
"body": [ | |
"export default function Layout({ children }: { children: React.ReactNode }) {", | |
" $0", | |
"}" | |
] | |
}, | |
"Next.js Page": { |
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
export function Layout({ children }: { children: React.ReactNode }) { | |
return ( | |
<html> | |
<body> | |
{children} | |
</body> | |
</html> | |
); | |
} |
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
import { getHighlighter as shikiGetHighlighter } from "shiki"; | |
import { cache } from "react"; | |
interface ShikiProps { | |
code: string; | |
lang: string; | |
theme: string; | |
} | |
export async function Shiki({ code, lang, theme }: ShikiProps) { |
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
type RouteParams<string> = Record<string, string>; | |
type RouteParams<`${infer Start}:${infer Param}/${infer Rest}`> = {[k in Param | keyof RouteParams<Rest>]: string}; | |
type RouteParams<`${infer Start}:${infer Param}`> = {[k in Param]: string}; | |
type RouteParams<unknown> = {}; |
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
import * as React from "react"; | |
import { ImageResponse } from "workers-og"; | |
interface Env {} | |
export default { | |
async fetch( | |
request: Request, | |
env: Env, | |
ctx: ExecutionContext |
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
import * as crypto from "node:crypto"; | |
import type { | |
SessionIdStorageStrategy, | |
SessionStorage, | |
} from "@remix-run/server-runtime"; | |
import { createSessionStorage } from "@remix-run/node"; | |
import { DynamoDB } from "aws-sdk"; | |
interface DynamoDbSessionStorageOptions { | |
/** |
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
type effect | |
@module("use-effect-reducer") | |
external useEffectReducer: ( | |
@uncurry ( | |
'state, | |
'action, | |
@uncurry ((('state, unit, @uncurry ('action => unit)) => option<unit => unit>) => effect), | |
) => 'state, | |
'state, |
NewerOlder