sudo apt update && sudo apt upgrade && sudo apt full-upgrade && sudo apt dist-upgrade && sudo apt-get check && sudo apt -f install && sudo apt -y clean && sudo apt -y autoclean && sudo apt autoremove && sudo dpkg --configure -a && sudo apt --fix-broken install && sudo do-release-upgrade
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
class MultiSingletonHelper { | |
private static readonly instances: MultiSingletonHelper[] = []; | |
private readonly param1: string; | |
private readonly param2?: string; | |
private constructor(param1: string, param2?: string) { | |
this.param1 = param1; | |
this.param2 = param2; |
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
module.exports = { | |
root: true, | |
extends: [ | |
'eslint:recommended', | |
'plugin:react/recommended', | |
'plugin:react-hooks/recommended', | |
'plugin:react/jsx-runtime', | |
'plugin:storybook/recommended', | |
'plugin:import/recommended', | |
'plugin:jsx-a11y/recommended', |
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 { 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 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 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 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 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 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 { fileURLToPath } from 'url'; | |
const __filename = fileURLToPath(import.meta.url); | |
const __dirname = path.dirname(__filename); | |
console.log(__dirname) |