This file contains 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
type ExtractKeys<T> = { | |
[K in keyof T & string]: T[K] extends any[] | |
? `${K}` | |
: T[K] extends object | |
? | |
`${K}` | `${K}.${ExtractKeys<T[K]>}` | |
: `${K}`; | |
}[keyof T & string]; | |
type ExtractNonDateKeys<T> = { |
This file contains 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
# Windows | |
netstat -ano | findstr 8085 | |
# Proto End Local End Externo Estado PID | |
TCP 0.0.0.0:8085 0.0.0.0:0 LISTENING 6000 | |
TCP 127.0.0.0:8085 127.0.0.0:61588 CLOSE_WAIT 6000 | |
TCP 127.0.0.0:8085 127.0.0.0:8085 FIN_WAIT_2 27340 | |
TCP [::]:8085 [::]:0 LISTENING 6000 |
This file contains 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
# include with current commit filename | |
tar --exclude='*.git' --exclude='node_modules' -zcvf `git rev-parse HEAD`.tgz * | |
# simple | |
tar -zcvf filename.tgz * |
This file contains 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 regex = { | |
cnpj: /^(\d{2})(\d{3})?(\d{3})?(\d{4})?(\d{2})?$/u, | |
cpf: /^(\d{3})(\d{3})?(\d{3})?(\d{2})?$/u, | |
}; | |
const replaceValue = { | |
cnpj: "$1.$2.$3/$4-$5", | |
cpf: "$1.$2.$3-$4", | |
}; |
This file contains 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
sudo apt install zsh | |
zsh --version | |
curl --version | |
sudo apt install curl | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
# selecione um tema legal aqui: https://github.com/ohmyzsh/ohmyzsh/wiki/Themes | |
nano .zshrc | |
# trocar o ZSH_THEME="nomedotemaescolhido" salva, fecha e reinicia | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)" | |
#or |