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
export const mailConfigurationSchema = z.object({ | |
apiKey: z.string().default(""), | |
fromEmail: z | |
.string() | |
.email() | |
.optional() | |
.or(z.literal("")) | |
.default(""), | |
toName: z.string().default(""), | |
toEmail: z |
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 { type User } from "@/server/auth/types"; | |
import { type SelectProduct } from "@/server/db/schema/products-schema"; | |
import { | |
ApiError, | |
CheckoutPaymentIntent, | |
Client, | |
ClientCredentialsAuthManager, | |
Environment, | |
LogLevel, | |
OrderApplicationContextShippingPreference, |
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
"use client"; | |
import { Button } from "@/components/ui/button"; | |
import { | |
Dialog, | |
DialogContent, | |
DialogDescription, | |
DialogTitle, | |
DialogTrigger, | |
} from "@/components/ui/dialog"; |
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
export const WEBHOOK_CONFIG_MODES = [ | |
{ value: "auto", label: "Auto" }, | |
{ value: "manual", label: "Manual" }, | |
] as const; | |
export type WebhookConfigMode = (typeof WEBHOOK_CONFIG_MODES)[number]; | |
export const WEBHOOK_CONFIG_MODE_VALUES = WEBHOOK_CONFIG_MODES.map( | |
(mode) => mode.value, | |
) as [string, ...string[]]; |
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
{ | |
"api_version": "2025-01-27.acacia", | |
"created": 1739648336, | |
"data": { | |
"object": { | |
"adaptive_pricing": null, | |
"after_expiration": null, | |
"allow_promotion_codes": null, | |
"amount_subtotal": 1000, | |
"amount_total": 1000, |
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
"use client"; | |
import { useState } from "react"; | |
import { generateReactHelpers } from "@uploadthing/react"; | |
import type { OurFileRouter } from "@/app/api/uploadthing/core"; | |
export const { uploadFiles } = generateReactHelpers<OurFileRouter>(); | |
interface FormData { | |
name: string; |
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
'use server' | |
export async function signUpAction() { | |
const { data, error } = await authClient.signUp.email({ | |
email: "[email protected]", | |
password: "password", | |
name: "John Doe", | |
}); | |
return { data, error }; |
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
""" | |
This script scrapes discussions from the Yoast SEO plugin's public forum on | |
WordPress (https://wordpress.org/support/plugin/wordpress-seo/). The script | |
fetches discussion titles and URLs from all available pages. | |
The script also features lazy loading by adding a delay between requests. This | |
helps ensure responsible web scraping by not overwhelming the server. | |
The fetched URLs are then saved to multiple CSV files, each containing a | |
specified number of URLs (default is 500). The CSV files are saved in the 'dist/' |
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
#!/usr/bin/env python3 | |
""" | |
Workday Random Numbers Generator | |
This script generates random floating-point numbers between 8 and 10, | |
rounded to 2 decimal places, only for workdays in a specified month and year. | |
Since the script usually runs from the first week of the following month, the | |
default month and year are set to the previous month and year. The script also | |
highlights weekends in red. The output is printed to the console and copied to | |
your clipboard. |
NewerOlder