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 initialIP = 0 | |
const endIP = 255 | |
const testConnection = async () => { | |
try { | |
const response = await api.get("/api/connection ", { | |
headers: { | |
"X-Api-Key": "<api-key>", | |
"Content-Type": "application/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
const verifySum = (cpf: number[], lastIndex: number): number => cpf | |
.slice(0, lastIndex) | |
.reverse() | |
.reduce((total, current, index) => total + (current * (index + 2)), 0); | |
const verifyRest = (sum: number, digit: number) => { | |
const rest = (sum * 10) % 11; | |
const newRest = ((rest == 10) || (rest == 11)) ? 0 : rest; | |
return newRest == digit; | |
} | |
export const validateCPF = (cpf: string) => { |
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
function soma(a, b){ | |
return a + b | |
} | |
function mostraSoma(a, b){ | |
console.log(a + b) | |
} | |
let somado = soma(5, 4) | |
console.log(somado) |
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
# See smb.conf.example for a more detailed config file or | |
# read the smb.conf manpage. | |
# Run 'testparm' to verify the config is correct after | |
# you modified it. | |
[global] | |
workgroup = SAMBA | |
security = user | |
passdb backend = tdbsam |
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
/((\([0-9]{2}\))|([0-9]{2}))( ?9)? ?([0-9]{4})(-| )?([0-9]{4})/igm | |
/* | |
O padrão aceita várias mascaras diferentes para o telefone, com ou sem o 9º digito. | |
Alguns exemplos são: | |
(##) 9 ####-#### | |
(##) ####-#### | |
Com ou sem os parêntesis: | |
## ####-#### |
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
version: "3.7" | |
services: | |
api: | |
build: ./server/api/ | |
command: ./manage.py runserver 0.0.0.0:8000 | |
volumes: | |
- ./server/api:/code/ | |
ports: | |
- 8000:8000 |