Skip to content

Instantly share code, notes, and snippets.

View Masheen88's full-sized avatar

Matthew Cox Masheen88

View GitHub Profile
@Masheen88
Masheen88 / pnpm_instructions.md
Last active October 21, 2024 15:57
pnpm commands

Update all packages in a monorepo

up: This is short for update and will update all dependencies.

-L: Stands for latest, which means it will update to the latest versions, regardless of your current version constraints in package.json.

-r: Runs the command recursively, updating dependencies for all packages in a monorepo (if applicable).

-i: Opens an interactive prompt, giving you control over which versions to upgrade.

@Masheen88
Masheen88 / reactformvalidation.jsx
Created October 21, 2024 14:56
React Form Validation Component
import { useForm, Controller } from "react-hook-form";
import { useEffect } from "react";
// Define validation rules
const validationRules = {
required: {
value: true,
message: "This field is required.",
},
email: {
@Masheen88
Masheen88 / colorfulConsoleLogs.js
Last active September 4, 2024 19:33
Colorful Console Logs!
//NOTE colored console log
//Colors the console log text blue and the font size 30px
someCoolVariable = "Hello World!";
//Outputs red text
// `Text/Variables/Etc..`,`CSS Styles`
console.log(`%c Hello World!`, `color: red;`); // %c is a placeholder for css styling
@Masheen88
Masheen88 / gist:4a2fbc40d9ed2c191485331a2ec0f71f
Last active September 5, 2024 06:38
Multiply numbers using the forEach method
console.log("this is my test page:");
//1. need a set of numbers to multiply
let myNumbers = [10, 15];
console.log("This is my original Array", myNumbers);
//2. done need a function to multiply things
// we need an parameter to pass into our function