Count all words in specific file type in sub directory
find . -name "*.md" -type f -exec cat {} + | wc -w
// contour isoline cartography shader
export const frag = `
#extension GL_OES_standard_derivatives : enable
#ifdef GL_ES
precision highp float;
#endif
varying vec2 var_vertTexCoord;
// fallback for a partially supported hook | |
// source https://github.com/tailwindlabs/headlessui/blob/main/packages/%40headlessui-react/src/hooks/use-id.ts | |
import React from 'react' | |
import { useIsoMorphicEffect } from './use-iso-morphic-effect' | |
import { useServerHandoffComplete } from './use-server-handoff-complete' | |
import { env } from '../utils/env' | |
export let useId = | |
// Prefer React's `useId` if it's available. |
#!/bin/bash | |
echo "VERCEL_GIT_COMMIT_MESSAGE: $VERCEL_GIT_COMMIT_MESSAGE" | |
if [[ "$VERCEL_GIT_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then | |
# Proceed with the build | |
exit 1; | |
else | |
# Don't proceed with the build |
name: Tests | |
on: | |
pull_request: | |
jobs: | |
Unit: | |
runs-on: ubuntu-latest | |
strategy: |
const FocusDemo = () => { | |
// with callback | |
const [inputRef, setInputFocus] = useFocus<HTMLInputElement>(); | |
// on component mount | |
const ref = useAutoFocus<HTMLInputElement>(); | |
return ( | |
<> | |
<button onClick={setInputFocus} > |
import { useEffect, useRef } from "react"; | |
/** | |
* A React hook that returns true if the component is being rendered for the first time. | |
* | |
* @returns boolean | |
* @example | |
* ```tsx | |
* import { useIsInitialRender } from "hooks/useIsInitialRender"; | |
* |
const TIMEOUT_DURATION_MS = 3000; | |
/** | |
* Fetches a resource with a timeout. | |
* | |
* @param input - The resource to fetch. | |
* @param init - The options for the fetch. | |
* @param timeoutDuration - The timeout duration in milliseconds. | |
* | |
* @returns A promise that resolves to the response of the fetch. |
import { suppressConsoleLogs } from "test/utils/suppressConsoleLogs"; | |
import { concurrentFetch } from "./concurrentFetch"; | |
describe("concurrentFetch", () => { | |
it( | |
"should return an array of resolved values", | |
suppressConsoleLogs(async () => { | |
const result = await concurrentFetch( | |
Promise.resolve("value1"), |