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
const useWindowSize = () => { | |
const [dimensions, setDimension] = useState({ | |
width: window.innerWidth, | |
height: window.innerHeight, | |
}); | |
useEffect(() => { | |
const handler = () => { | |
const {innerWidth, innerHeight} = window; | |
setDimension({ width: innerWidth, height: innerHeight}) |
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 React from 'react'; | |
import { styled } from '@material-ui/styles'; | |
import AppBar from '@material-ui/core/AppBar'; | |
type CustomProps = { show: boolean }; | |
// Let's imagine MyComponent is a special type of button... | |
type MyComponentProps = CustomProps & React.HTMLProps<HTMLButtonElement>; | |
const MyComponent = ({show, ...rest}: MyComponentProps) => { |
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/sh | |
# place this under /usr/local/bin/tmux-dev | |
if [ -z "$1" ] | |
then | |
echo "No session name supplied" | |
exit 1 | |
fi | |
tmux new-session -d -s $1 |
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
for file in *.wav; do lame -V2 "$file" "${file%.wav}".mp3 -b 128; done |
OlderNewer