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 removeAcento = (texto) => { | |
texto = texto.toLowerCase(); | |
texto = texto.replace(new RegExp('[ÁÀÂÃ]','gi'), 'a'); | |
texto = texto.replace(new RegExp('[ÉÈÊ]','gi'), 'e'); | |
texto = texto.replace(new RegExp('[ÍÌÎ]','gi'), 'i'); | |
texto = texto.replace(new RegExp('[ÓÒÔÕ]','gi'), 'o'); | |
texto = texto.replace(new RegExp('[ÚÙÛ]','gi'), 'u'); | |
texto = texto.replace(new RegExp('[Ç]','gi'), 'c'); | |
return texto; | |
} |
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 totalvoice = require('totalvoice-node'); | |
const client = new totalvoice("d02e833139b37a8f62bfeeb48b4d98a4"); | |
const NUM1 = process.env.NUM1; | |
const NUM2 = process.env.NUM2; | |
var opcoes = {velocidade: 2, tipo_voz: "br-Vitoria"}; | |
client.tts.enviar(NUM1, NUM2, opcoes) | |
.then((data) => console.log(data)) | |
.catch((error) => console.log('Erro: ', error)); |
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 readline = require('readline') | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}) | |
const question1 = () => { | |
return new Promise((resolve, reject) => { | |
rl.question('q1 What do you think of Node.js? ', (answer) => { |
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
var docWidth = document.documentElement.offsetWidth; | |
[].forEach.call( | |
document.querySelectorAll('*'), | |
function(el) { | |
if (el.offsetWidth > docWidth) { | |
console.log(el); | |
} | |
} | |
); |
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
npm list -g --depth 0 |
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 formValidate() { | |
$.validator.addMethod("pattern", function(value, element) { | |
return this.optional(element) || /^\(\d{2}\)\s\d{4,5}-\d{4}$/.test(value); | |
}); | |
$('#form').validate({ | |
rules: { | |
nome: "required", | |
email: { | |
required: true, |
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
// Site | |
https://www.google.com/recaptcha/intro/android.html | |
// Doc | |
https://developers.google.com/recaptcha/docs/verify |
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
$tablet: 768px; | |
@mixin tablet { | |
@media (max-width: #{$tablet}) { | |
@content; | |
} | |
} | |
p { | |
font-size: 18px; |
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
$('form').submit(function(){ | |
$(this)[0].reset(); | |
}); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<form id="myform" method="post"> | |
<input type="text" id="nome" name="nome" placeholder="nome"> |
NewerOlder