This file contains hidden or 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
{ | |
"restartable": "rs", | |
"ignore": [".git", "node_modules"], | |
"verbose": true, | |
"execMap": { | |
"ts": "node --loader ts-node/esm" | |
}, | |
"watch": ["src"], | |
"env": { | |
"NODE_ENV": "development" |
This file contains hidden or 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 { useEffect, useState } from 'react'; | |
import TrackPlayer, { TrackPlayerEvents } from 'react-native-track-player'; | |
type Delay = number | null; | |
type TimerHandler = () => void; | |
/** | |
* Provides a declarative useInterval | |
* @param callback - Function that will be called every `delay` ms. | |
* @param delay - Number representing the delay in ms. Set to `null` to "pause" the interval. |
This file contains hidden or 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
#!/bin/bash | |
ps -C $1 -O rss | awk '{ count ++; sum += $2 }; END {count --; print "Number of processes =",count; print "Memory usage per process =",sum/1024/count, "MB"; print "Total memory usage =", sum/1024, "MB" ;};' |