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
| const hasLetter = (str, letter) => str.indexOf(letter.toLowerCase()) > -1 | |
| const hasLetter2 = (str, letter) => str.includes(letter.toLowerCase()) | |
| // "thiago marinho".includes('m') | |
| // "thiago marinho".indexOf('m') > -1 |
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
| ::-webkit-scrollbar { | |
| display: none; | |
| } | |
| /* | |
| <div style={{ overflow: 'scroll', border: '0px', maxHeight: '100vh' }}> | |
| {children} | |
| </div> | |
| */ |
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
| <!DOCTYPE html> | |
| <!--[if IE 9]><html class="ie9" lang="pt-br"><![endif]--> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <!-- Global site tag (gtag.js) - Google Analytics --> |
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
| #change keyboard to pt_br | |
| #add list download updates | |
| sudo gedit /etc/apt/sources.list | |
| deb [by-hash=force] http://linuxdeepin.c3sl.ufpr.br/deepin/ panda main contrib non-free | |
| sudo apt update -y | |
| sudo apt dist-upgrade -y |
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
| // quando o arquivo foi exportado como json | |
| // $ mongoimport -h localhost:3001 -d meteor -c members members_new.json | |
| // se o arquivo estiver em outro formato mas como json basta: | |
| // mongoimport -h localhost:3001 -d meteor -c members --jsonArray file.json |
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
| // Training HOF => High Order Functions | |
| const fnName = () => prompt('tell me your name') | |
| const fnMiddle = () => prompt('tell me your middle name') | |
| const fnLastName = () => prompt('tell me your lastname') | |
| // Debuging |
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
| const fnName = () => prompt('Tell me your name.') | |
| const fnMiddle = () => prompt('Tell me your middle name.') | |
| const fnLastName = () => prompt('Tell me your last name.') |
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
| const withNameComplete = (...funcs) => funcs.map(func => func()).join(' ') |
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
| // example declare 3 funcs and I use it passing to withNameComplete | |
| const fnName = () => prompt('Tell me your name') | |
| const fnMiddle = () => prompt('Tell me your middle name') | |
| const fnLastName = () => prompt('Tell me your lastname') | |
| const withNameComplete = (…funcs) => console.log(funcs); | |
| withNameComplete(fnName, fnMiddle, fnLastName) |
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
| const fnName = () => prompt('tell me your name') | |
| const fnMiddle = () => prompt('tell me your middle name') | |
| const fnLastName = () => prompt('tell me your lastname') | |
| // using Map | |
| const withNameComplete = (...funcs) => funcs.map(func => func()).join(' ') | |
| console.log(withNameComplete(fnName, fnMiddle, fnLastName)) |