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
document.querySelectorAll(".ytp-ce-element").forEach((el) => el.remove()); |
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
# Generate passwords | |
date +%s | sha256sum | base64 | head -c 32 ; echo |
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
# Alterar permissões para a pasta storage | |
sudo chgrp -R www-data storage bootstrap/cache | |
sudo chmod -R ug+rwx storage bootstrap/cache |
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
document.getElementsByTagName('video')[0].requestPictureInPicture(); |
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
# Exibir todos os commits de origin/develop que não estão em origin/master | |
git log origin/master..origin/develop --oneline | |
# Exibir quais commits do branch atual não estão em origin/master | |
git log origin/master..HEAD --oneline | |
# Exibir alterações em origin/develop que não estão em origin/master | |
git diff --stat origin/master..origin/develop |
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
# trocar hash pelo começo ou todo o hash do commit | |
git show --pretty="" --name-only hash | |
# Exemplo: | |
git show --pretty="" --name-only 8f9831a35767 | |
# Pra exibir a quantidade de arquivos que foram alterados basta adicionar o wc com a opção -l | |
git show --pretty="" --name-only 8f9831a35767 | wc -l |
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
(function(selector, sub) { | |
elems = jQuery(selector); | |
for(i = 0; i < elems.length; i++) { | |
str = jQuery(elems[i]).attr('href'); | |
if (str.endsWith('/')) | |
str = str.slice(0, str.length - 1); | |
index = str.lastIndexOf('/'); | |
jQuery(elems[i]).attr('href', str.substring(0, index) + '/' + sub + str.substring(index) ); | |
} | |
})('.listagem h2 a', 'noticias'); |
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
# Gera um zip, preservando hierarquia, de todos os arquivos modificados desde o commit do hash informado até o HEAD | |
git diff --name-only f631445f61cc117bad4852e8f9633888f406644d HEAD | tar -czf mudancas.tgz -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
# Pra criar um arquivo patch do HEAD até 10 commits atrás: | |
git format-patch -10 HEAD --stdout > 0001-ultimos-10-commits.patch | |
# Pra applicar o patch: | |
git apply --stat file.patch # Mostra o status | |
git apply --check file.patch # Checa por erros antes de aplicar | |
git am < file.patch # Aplica o patch |
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
git diff --name-only HEAD~2 | zip mudancas.zip -@ |
NewerOlder