arecord | aplay
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 | |
| # find ./src/processos -iname "*auctioneer*" -exec ./rename-everything.sh {} \; | |
| OLD_FILE=$1 | |
| ORIGINAL_MODULE="auctioneer" | |
| NEW_MODULE="processo" | |
| echo "path: " $OLD_FILE |
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
| redis-cli -h <host> -p <port> -a <senha> |
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
| git config core.autocrlf false | |
| git rm --cached -r . // dont forget the dot at the end | |
| git reset --hard |
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
| #!/usr/bin/env bash | |
| ``` | |
| # Less than 100mb | |
| wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O FILENAME | |
| # More than 100mb | |
| wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O FILENAME && rm -rf /tmp/cookies.txt | |
| ``` |
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 } from 'react'; | |
| function useClickOutside(refs, callback) { | |
| function handleClickOutside(event) { | |
| refs = Array.isArray(refs) ? refs : [refs]; | |
| const mountedRefs = refs.every((ref) => !!ref.current); | |
| if (mountedRefs) { | |
| const isSomeRef = refs.every( | |
| (ref) => !ref.current.contains(event.target) |
NewerOlder