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
class Calcular { | |
somar(valor, salarioPessoas) { | |
let total; | |
if (total === undefined) { | |
valor = null; | |
} else if (valor > 0) { | |
total = valor; | |
for (let salario of salarioPessoas) { |
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
snail = function(array) { | |
if (array.length === 0) return [] | |
if (array.length === 1) return array[0] | |
const a = [] | |
let bxi = 0 | |
let bxe = array[0].length - 1 | |
let byi = 0 | |
let bye = array.length - 1 |
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 digitalRoot(n) { | |
if (n < 10) { | |
return n; | |
} | |
let nu = n | |
let s = 0 | |
while(nu > 0) { | |
const r = nu % 10 |
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
interface User { | |
id: number; | |
name: string; | |
email: string; | |
password: string; | |
updated_at: Date; | |
} | |
interface Product { | |
id: number; |
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
bradlc.vscode-tailwindcss | |
clinyong.vscode-css-modules | |
dbaeumer.vscode-eslint | |
eamodio.gitlens | |
EditorConfig.EditorConfig | |
esbenp.prettier-vscode | |
glenn2223.live-sass | |
golang.go | |
jock.svg | |
Luisao.one-more-coffee |
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
{ | |
"explorer.confirmDragAndDrop": true, | |
"diffEditor.wordWrap": "on", | |
"editor.fontSize": 18, | |
"editor.insertSpaces": true, | |
"editor.detectIndentation": true, | |
"launch": { | |
"configurations": [] | |
}, | |
"editor.codeActionsOnSave": { |
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
* { | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
} | |
html { | |
font-size: 62.5%; | |
} |
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
const user = { | |
name: 'luis' | |
} | |
const messages = { | |
hello: (userName) => `Ola ${userName}, seja bem vindo ao nosso sistema`, | |
goodBye: (userName) => `Até mais ${userName}, esperamos que volte sempre aqui`, | |
} | |
const messagesHandler = { | |
get(target, prop, receiver) { | |
return target[prop](user.name) |
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
import React from 'react' | |
export const useLocalStorage = <T extends string | object>( | |
item: string, | |
initialValue = '', | |
): [string, React.Dispatch<(value: T) => T>] => { | |
const [localStorageItem, setLocalStorageItem] = React.useState(() => { | |
const itemStoraged = localStorage.getItem(item) | |
if (itemStoraged) { |
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
import React from 'react' | |
interface IComposeProvidersProps { | |
with: Array<React.ElementType> | |
children: React.ReactNode | |
} | |
export const ComposeProviders = ({ | |
with: Providers, | |
children, |
NewerOlder