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
# npm config set //nexus.example.com/npm-all/:_auth=$(echo -n 'test:1234' | base64) | |
//nexus.example.com/npm-all/:_auth=dGVzdDoxMjM0 | |
# npm config set //nexus.example.com/npm-releases/:_auth=$(echo -n 'test:1234' | base64) | |
//nexus.example.com/npm-releases/:_auth=dGVzdDoxMjM0 | |
# npm config set @myco:registry=http://nexus.example.com/npm-releases/ | |
@myco:registry=http://nexus.example.com/npm-releases/ | |
# npm config set registry https://nexus.example.com/npm-all/ | |
registry=https://nexus.example.com/npm-all/ |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Check zoom</title> | |
<style> | |
.zoom2 { | |
zoom: 2; |
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 { transformFile } from '@swc/core' | |
import { writeFile } from 'node:fs/promises' | |
import { resolve } from 'node:path' | |
/** @type {import('@swc/core').Options} */ | |
const baseSwcOptions = { | |
jsc: { | |
target: 'es2022', | |
parser: { | |
syntax: 'ecmascript', |
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 { useState, useMemo, useReducer, memo } from "react"; | |
const MyButton = memo(() => { | |
const value = useMemo(() => Math.random(), []); | |
return <button>MyButton {value}</button>; | |
}); | |
export default function MyApp() { | |
const [flag, setFlag] = useState(false); |
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 React, { memo, useEffect, useMemo, useState } from "react"; | |
import { Divider, Header, List, Image, Grid } from "semantic-ui-react"; | |
type TMovie = { | |
id: string; | |
previewLink: string; | |
name: string; | |
year: string; | |
description: string; | |
rate: string; |
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
{ | |
"imports": { | |
"react": "https://esm.sh/stable/[email protected]/es2022/react.mjs", | |
"react-dom/client": "https://esm.sh/stable/[email protected]/es2022/client.js" | |
} | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Number(str) vs +str</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>[...str] vs Array.from(str)</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Filter with has vs Filter with includes</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |