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
############################################# /etc/systemd/system/rc-local.service | |
[Unit] | |
Description=/etc/rc.local Compatibility | |
ConditionPathExists=/etc/rc.local | |
[Service] | |
Type=forking | |
ExecStart=/etc/rc.local start | |
TimeoutSec=0 | |
StandardOutput=tty | |
RemainAfterExit=yes |
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
// Tag <video> | |
const video = document.querySelector("[data-video]"); | |
const botaoIniciarCamera = document.querySelector("[data-video-botao]"); | |
const campoCamera = document.querySelector("[data-camera]"); | |
const botaoTirarFoto = document.querySelector("[data-tirar-foto]"); | |
const canvas = document.querySelector("[data-video-canvas]"); | |
const mensagem = document.querySelector("[data-mensagem]"); | |
const botaoEnviarFoto = document.querySelector("[data-enviar]") |
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
//MAP | |
function aplicarDesconto(livros) { | |
const desconto = 0.3 | |
livrosComDesconto = livros.map(livro => { | |
return {...livro, preco: livro.preco - (livro.preco * desconto)} | |
}) | |
return livrosComDesconto | |
} | |
//Reduce |
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
async function buscaEndereco(cep) { | |
var mensagemErro = document.getElementById('erro'); | |
mensagemErro.innerHTML = ""; | |
try { | |
var consultaCEP = await fetch(`https://viacep.com.br/ws/${cep}/json/`); | |
var consultaCEPConvertida = await consultaCEP.json(); | |
if (consultaCEPConvertida.erro) { | |
throw Error('CEP não existente!'); | |
} | |
var cidade = document.getElementById('cidade'); |
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 elementoChute = document.getElementById('chute') | |
window.SpeechRecognition = window.SpeechRecognition || webkitSpeechRecognition; | |
const recognition = new SpeechRecognition(); | |
recognition.lang = 'pt-Br' | |
recognition.start() | |
recognition.addEventListener('result', onSpeak) | |
recognition.addEventListener('end', () => { location.reload(); } ) |
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
for i in `seq 50 71`; do | |
echo PASSWORD | ssh -tt user@192.168.0.$i "sudo echo sed -i -e '$aSSH-KEY' /root/.ssh/authorized_keys " | |
done |
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
version: '3.1' | |
services: | |
db: | |
image: mysql:5.7 | |
command: --default-authentication-plugin=mysql_native_password | |
volumes: | |
- ./mysql-data:/var/lib/mysql | |
- ./sql:/docker-entrypoint-initdb.d | |
environment: |
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
# | |
while (ps -ef | grep -v grep | grep recover_dentries &> /dev/null) | |
do | |
sleep 10 | |
done | |
wget -q -O /dev/null https://r2.paginas.ufsc.br/done | |
# while (ps -ef | grep -v grep | grep recover_dentries &> /dev/null);do sleep 10; done; wget -q -O /dev/null https://r2.paginas.ufsc.br/recover_done |
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
version: "3.3" | |
volumes: | |
nfs: | |
services: | |
rocketchat1: | |
image: rocketchat/rocket.chat:3.18.3 | |
volumes: | |
- nfs:/app/uploads | |
ports: | |
- 1200:3000 |
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
# | |
version: "3.6" | |
services: | |
server2: | |
image: botpress/server:v12_19_1 | |
volumes: | |
- nfsprodegesp:/botpress/data | |
- modules:/botpress/modules | |
ports: | |
- 8081:8081 |