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
// convex/http.ts | |
import { httpRouter } from "convex/server"; | |
import { httpAction } from "./_generated/server"; | |
import { createWebhooksHandler } from "@brianmmdev/clerk-webhooks-handler"; | |
import { api } from "./_generated/api"; | |
// define the webhook handler | |
const handleClerkWebhook = httpAction(async (ctx, request) => { | |
const handler = createWebhooksHandler({ | |
onUserCreated: async user => { |
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
#!/bin/bash | |
# Set variables | |
REGISTRY_URL="localhost:32000" | |
get_in_use_images() { | |
microk8s kubectl get pods --all-namespaces -o jsonpath='{.items[*].spec.containers[*].image}' | tr ' ' '\n' | sort | uniq | |
} | |
get_registry_images() { |
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
// Follow this setup guide to integrate the Deno language server with your editor: | |
// https://deno.land/manual/getting_started/setup_your_environment | |
// This enables autocomplete, go to definition, etc. | |
// Setup type definitions for built-in Supabase Runtime APIs | |
import "jsr:@supabase/functions-js/edge-runtime.d.ts" | |
import { createClient } from 'https://esm.sh/@supabase/[email protected]' | |
console.log("Hello from Functions!") |
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 { ReactNode } from "react" | |
import Navbar from "./Navbar" | |
import { useUser } from "@clerk/remix" | |
import { Toaster } from "./ui/toaster" | |
import Spinner from "./Spinner" | |
import { PosthogPageview } from "~/posthog/PosthogPageview" | |
import OnboardingDialog from "./OnboardingDialog" | |
import { useLoaderData } from "@remix-run/react" | |
import { clerkLoader } from "~/loaders" | |
import { useQuery } from "convex/react" |
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
{ | |
"Convex Query": { | |
"prefix": "cvq", | |
"scope": "typescript", | |
"body": [ | |
"export const ${1} = query({", | |
"\targs: {", | |
"\t\t${2}", | |
"\t},", | |
"\thandler: async (ctx, args) => {", |
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 const config = { | |
matcher: [ | |
// Skip Next.js internals and all static files, unless found in search params | |
'/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)', | |
// Always run for API routes | |
'/(api|trpc)(.*)', | |
], | |
}; |
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 { WebhookEvent } from "@clerk/nextjs/server"; | |
import { headers } from "next/headers"; | |
import { NextRequest, NextResponse } from "next/server"; | |
import { Webhook } from "svix" | |
type WebhooksHandler = { | |
config: WebhookRegistrationConfig | |
POST: (req: NextRequest) => Promise<NextResponse | Response> | |
} |
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 { WebhookEvent } from "@clerk/nextjs/server"; | |
import { headers } from "next/headers"; | |
import { NextRequest, NextResponse } from "next/server"; | |
import { Webhook } from "svix"; | |
export type WebhookRegistrationConfig = { | |
secret?: string | |
urlPrefix?: string | |
onUserCreated?: (event: WebhookEvent) => Promise<void | NextResponse>; | |
onUserUpdated?: (event: WebhookEvent) => Promise<void | NextResponse>; |
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
name: Prisma PR PlanetScale Demo | |
on: | |
pull_request: | |
types: [opened] | |
paths: | |
- schema.prisma | |
env: | |
PLANETSCALE_ORG: bmorrison-ps | |
PLANETSCALE_DB: recipes_db |
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 { Client } = require("@notionhq/client") | |
const notion = new Client({ | |
auth: "<NOTION_SECRET>", | |
notionVersion: "2022-02-22" | |
}) | |
;(async() => { | |
const res = await notion.databases.query({ | |
database_id: "<NOTION_DBID>" |
NewerOlder