qpdf --empty --pages *.pdf -- out.pdf
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 { z } from "zod"; | |
const envVariables = z.object({ | |
DATABASE_URL: z.string(), | |
CUSTOM_STUFF: z.string(), | |
}); | |
export const ENV = envVariables.parse(process.env); | |
declare global { |
- Identify the 20% of [topic or skill] that will yield 80% of the desired results and provide a focused learning plan to master it.
- Explain [topic or skill] in the simplest terms possible as if teaching it to a complete beginner. Identify gaps in my understanding and suggest resources to fill them.
- Create a study plan that mixes different topics or skills within [subject area] to help me develop a more robust understanding and facilitate connections between them.
- Design a spaced repetition schedule for me to effectively review [topic or skill] over time, ensuring better retention and recall.
- Help me create mental models or analogies to better understand and remember key concepts in [topic or skill]."
- Suggest various learning resources (e.g., videos, books, podcasts, interactive exercises) for [topic or skill] that cater to different learning styles.
- Provide me with a series of challenging questions or problems related to [topic or skill] to test my understan
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 async function createUser() { | |
const {user, error} = await api.createUser(); | |
if(error) { | |
throw new UserError({ | |
name: "CREATE_USER_ERROR", | |
message: "Failed to create user", | |
cause: error | |
}) |
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 nameKey = Symbol("name"); | |
/** | |
* To perserve class name though mangling. | |
* @example | |
* @name('Customer') | |
* class Customer {} | |
* @param className | |
*/ | |
export function name(className: string): ClassDecorator { |
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 { fileURLToPath } from 'url'; | |
const __filename = fileURLToPath(import.meta.url); | |
const __dirname = path.dirname(__filename); | |
console.log(__dirname) |
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
<body> | |
<div class="content"> | |
content | |
</div> | |
<footer class="footer"></footer> | |
</body> |
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 { ContextType, Result } from "./types"; | |
import React, { Context, createContext } from "react"; | |
export const Context = | |
createContext<ContextType<Result> | null>(null); | |
return ( | |
<Context.Provider | |
value={{ | |
result: {} as Result |
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
// https://www.typescriptlang.org/play?#code/C4TwDgpgBAglC8UDeBYAUFTUwCcD2YAjAFxQDOwOAlgHYDm6W2+YATKRdfY1rgQMwdKtBmgC+6dKEhQAQgigB5ALZVgAHhgAaKAHI+bXQD5JaadADCClWs079LfsdPmoADXUAVKBAAewCBoAEzJYKAAfOQioCyMFbz8A4NC4AH4w0gT-QJCo9PlSCwBuUwBjPBoKKCoyC1IPWIUkKB5MAxIoACIQPE6tVuYCdi6AdwgyAAs+9Ak0dHLK4GqyWXr1WTjEZoH20m7e-oxeRz2yAEMAGwBXYGnxMoqqmpg1mE3kFqO2lg79u6YDMNOmNJv9jgJTpcbncxEA | |
type A = { | |
prop1: string | |
prop2: string | |
prop3: string | |
} | |
type B = Omit<A, 'prop2'> |