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
| Ç^*|O | |
| # This is the configuration file for Ghostty. | |
| # | |
| # This template file has been automatically created at the following | |
| # path since Ghostty couldn't find any existing config files on your system: | |
| # | |
| # /Users/capelo/Library/Application Support/com.mitchellh.ghostty/config | |
| # | |
| # The template does not set any default options, since Ghostty ships | |
| # with sensible defaults for all options. Users should only need to set |
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 |
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
| 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
| 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
| /** | |
| * useScrollListener hook | |
| * Usage: const { scrollY, scrollDirection } = useScrollListener(); | |
| */ | |
| import { useState, useRef, useEffect } from 'react'; | |
| export function useScroll() { | |
| const [scrollY, setScrollY] = useState(0); | |
| const [progress, setProgress] = useState(0); |
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
| :set backupcopy=yes |
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
| body { | |
| padding: 10px; | |
| background: url('https://i.ytimg.com/vi/09nTwccQTUA/maxresdefault.jpg'); | |
| background-size: cover; | |
| font-size: 25px; | |
| margin: 0 auto; | |
| width: 100px; | |
| background-position: center; | |
| } |
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
| function getParamsObj(url) { | |
| return url | |
| .split('?')[1] | |
| .split('&') | |
| .map(function(el) { | |
| return el.split('='); | |
| }) | |
| .reduce(function(prevVal, currVal) { | |
| prevVal[currVal[0]] = currVal[1] | |
| .split(',') |
NewerOlder