Skip to content

Instantly share code, notes, and snippets.

View tarciozemel's full-sized avatar

Tárcio Zemel tarciozemel

View GitHub Profile
@tarciozemel
tarciozemel / git-temporary-ignore.md
Last active May 24, 2022 13:29 — forked from sloanlance/git-temporary-ignore.md
git: Ignorar temporariamente arquivos novos ou alterados sem alterar .gitignore

There are times notifications aren't wanted about either a changed repo file or a new file that needs to be added to the repo. However, adding the name of the file to .gitignore might not be a good option, either. For example, locally-generated files that other users aren't likely to generate (e.g., files created by an editor) or files of experimental test code might not be appropriate to appear in a .gitignore file.

In those cases, use one of these solutions:

  1. If the file is a changed repo file

    Use the command:

    git update-index --assume-unchanged "$FILE"

const docWidth = document.documentElement.offsetWidth
document.querySelectorAll('*').forEach(el => {
if (el.offsetWidth > docWidth) {
console.log(el)
}
})
@tarciozemel
tarciozemel / gist:e34cd8ec7297cddd018e854f2c8cad86
Created January 20, 2023 15:24
Diagnostic Stylesheet: identify script[async][defer]
/* @see https://twitter.com/csswizardry/status/1616451810004242432 */
head,
script[async][defer],
script[async][defer]::before {
display: block !important;
}
script[async][defer]::before {
background-color: white !important;