// string
"Essa Γ© uma string"
'Essa Γ© outra string'
`Adivinha sΓ³?! Mais uma string!`
// boolean
true
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
| var objeto = { tamanho: 10, nome: undefined, peso: 180 }; | |
| // =========================================== exemplo 1 | |
| // "desmembramento manual" =[ | |
| var size = objeto.tamanho; | |
| var name = objeto.nome || "Bruno"; | |
| var weight = objeto.peso; |
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
| // Discord all events! | |
| // A quick and dirty fleshing out of the discord.js event listeners (not tested at all!) | |
| // listed here -> https://discord.js.org/#/docs/main/stable/class/Client | |
| // Learn from this, do not just copy it mofo! | |
| // | |
| // Saved to -> https://gist.github.com/koad/316b265a91d933fd1b62dddfcc3ff584 | |
| /* | |
| koad-was-here |
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
| [/] | |
| appicon-margin=0 | |
| appicon-padding=5 | |
| available-monitors=[0] | |
| desktop-line-use-custom-color=false | |
| dot-color-1='#5294e2' | |
| dot-color-2='#5294e2' | |
| dot-color-3='#5294e2' | |
| dot-color-4='#5294e2' | |
| dot-color-dominant=true |
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
| document.querySelector('div.game_intro__inner.start > p').click(); | |
| setTimeout(() => { | |
| document.querySelector('div.game_intro__inner.end > div > p.continue').click(); | |
| var lastXp = 0; | |
| function loop() { | |
| var stage = parseInt(document.querySelector('div.ui > div > div.ui_progress__stage').innerText.slice(6)); | |
| try { | |
| var xp = parseInt(document.querySelector('div.game_inner__footer > div.resources > div').innerText.replace('xp', '')); |
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
| // ==UserScript== | |
| // @name CoinMarketCap Portfolio Tracker Title | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.2 | |
| // @description try to take over the world! | |
| // @author Bruno Silva | |
| // @match https://coinmarketcap.com/portfolio-tracker/ | |
| // @icon https://www.google.com/s2/favicons?domain=coinmarketcap.com | |
| // @grant none | |
| // ==/UserScript== |
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
| Copies the `foo.txt` file from the `experiment` branch to the `main` branch. | |
| ```sh | |
| git switch main | |
| git restore --source experiment -- foo.txt | |
| ``` |
Javascript FOR OF with loop index.
for (const [index, value] of [1, 2, 3, 4, 5].entries()) {
console.log(index, value);
}
// => 0 1
// => 1 2
// => 2 3
// => 3 4OlderNewer
