sudo chown -R `whoami` ~/.npm
sudo chown -R `whoami` /usr/local/lib/node_modules$ npm i -g npm
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/ansi-align
| Shader "Custom/Horizontal Skybox" | |
| { | |
| Properties | |
| { | |
| _Color1 ("Top Color", Color) = (1, 1, 1, 0) | |
| _Color2 ("Horizon Color", Color) = (1, 1, 1, 0) | |
| _Color3 ("Bottom Color", Color) = (1, 1, 1, 0) | |
| _Exponent1 ("Exponent Factor for Top Half", Float) = 1.0 | |
| _Exponent2 ("Exponent Factor for Bottom Half", Float) = 1.0 | |
| _Intensity ("Intensity Amplifier", Float) = 1.0 |
| #!/bin/sh | |
| parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) | |
| osascript -e 'tell app "Terminal" | |
| do script "cd '$parent_path' && cd ../first-app && yarn start" | |
| end tell' | |
| osascript -e 'tell app "Terminal" | |
| do script "cd '$parent_path' && cd ../second-app && yarn start" | |
| end tell' |
| new Array(16) | |
| .map((_, index) => { | |
| console.log('first', index) | |
| return index | |
| }) | |
| .reverse() | |
| .map((index) => console.log(index)) |
| const { | |
| useState, | |
| useRef, | |
| createRef, | |
| useEffect | |
| } = React; | |
| const data = [ | |
| { | |
| text: "test1" |
| import * as yup from 'yup'; | |
| // In your React component... | |
| const checkFormData = async () => { | |
| let schema = yup.object().shape({ | |
| testName: yup.string().required(), | |
| name: yup.string().required(), | |
| email: yup.string().email().required(), | |
| }); |
| function useMedia(query) { | |
| const [matches, setMatches] = useState(window.matchMedia(query).matches) | |
| useEffect(() => { | |
| const media = window.matchMedia(query) | |
| if (media.matches !== matches) { | |
| setMatches(media.matches) | |
| } | |
| const listener = () => { | |
| setMatches(media.matches) |
| type CompareObject = { [key: string]: any }; | |
| export default function shallowEqual(objA: CompareObject, objB: CompareObject) { | |
| if (objA === objB) { | |
| return true; | |
| } | |
| if (!objA || !objB) { | |
| return false; | |
| } |
| import React, { useLayoutEffect, useRef } from "react"; | |
| export type VectorCoordinate = { | |
| x: number; | |
| y: number; | |
| z: number; | |
| }; | |
| export type useAnimationProps = { | |
| from: { | |
| [key: string]: VectorCoordinate | number | string; |