Skip to content

Instantly share code, notes, and snippets.

View Kyu's full-sized avatar
😜
I like doing shit

Precious Kyu

😜
I like doing shit
View GitHub Profile
const useTimer = () => {
const [minutes, setMinutes] = useState(0)
const [seconds, setSeconds] = useState(0)
const [miliSeconds, setMiliSeconds] = useState(0)
const [stop, isSetStop] = useState(false)
useEffect(() => {
if (stop) return
setTimeout(() => {
echo '' | tee >(if [ -z "$(cat -)" ]; then echo "No output"; fi)