echo 3 | sudo tee /proc/sys/vm/drop_caches
sudo tee /proc/sys/vm/drop_caches
→ Escreve esse valor no arquivo /proc/sys/vm/drop_caches
, que o kernel do Linux usa para gerenciar a memória em cache.
echo 3 | sudo tee /proc/sys/vm/drop_caches
sudo tee /proc/sys/vm/drop_caches
→ Escreve esse valor no arquivo /proc/sys/vm/drop_caches
, que o kernel do Linux usa para gerenciar a memória em cache.
Proposito: Capturar os seguidores de um perfil do twitter e exibir no console.
Se voce seguir muitas pessoas, é interessante q scroll até o final da página para carregar todos os seguidores. Tem o script 2 que ajuda a fazer isto, mas depende da velocidade de download dos dados, recomento que faça manualmente.
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> = { |
# 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 |
# include with current commit filename | |
tar --exclude='*.git' --exclude='node_modules' -zcvf `git rev-parse HEAD`.tgz * | |
# simple | |
tar -zcvf filename.tgz * |
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", | |
}; |
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 |