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
openssl req -x509 -nodes -days 3650 -newkey rsa:4096 -keyout c:\certificates\nginx-selfsigned.key -out c:\certificates\nginx-selfsigned.crt | |
openssl dhparam -out c:\nginx\dhparam.pem 4096 |
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
#!/bin/bash | |
print_status() { | |
echo | |
echo "## $1" | |
echo | |
} | |
bail() { | |
echo 'Error executing command, exiting' |
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
import React, { useEffect } from "react"; | |
import { useState } from "react"; | |
function App() { | |
const [repositories, setRepositories] = useState([]); | |
useEffect(() => { | |
handleAddRepository(); | |
}, []); |
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
import * as Yup from 'yup'; | |
import { validateCpf } from '../../utils/validateCpf'; | |
import { validatePhone } from '../../utils/validatePhone'; | |
function isValidCPF(this: Yup.StringSchema) { | |
return this.test({ name: 'cpf', message: 'CPF Inválido', test: value => validateCpf(value) }); | |
} | |
function isValidPhoneNumber(this: Yup.StringSchema) { | |
return this.test({ name: 'sms', message: 'Número inválido', test: value => validatePhone(value) }); |
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.1' | |
services: | |
wordpress: | |
image: wordpress | |
volumes: | |
- ./wp-content:/var/www/html/wp-content | |
restart: always | |
ports: |
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
#!/bin/sh | |
# inpath - verify that a specified program is either valid as-is, | |
# or can be found in the PATH directory list. | |
if [ -d '~/www' ]; then | |
echo -e "Excluindo arquivos antigos." | |
rm -R ~/www | |
fi | |
echo -e "Clonando projeto do repositorio remoto" | |
git clone [email protected]:jurosbaixo/api-juros-baixos.git ~/www |
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
## Script de backup | |
## Backup completo e compactado | |
## Parâmetros de entrada "script caminho destino" | |
## Definindo variáveis. | |
Write-Host "Definindo variáveis..." | |
$Day = Get-Date -UFormat "%a" | |
$BackUpName = Get-Date -UFormat "%a_%Y%m%d.7z" | |
$Source = $args[0] | |
$Target = $args[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
# Cron de Backup de Segunda-Feira à Sexta-Feira | |
0 22 * * 1-5 root /backup/script |
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
#!/bin/bash | |
## Instalação do Samba. | |
apt-get install -y samba samba-common python-glade2 system-config-samba | |
## Backup do arquivo de configuação padrão e download das configurações pré-definidas em laboratório. | |
cd /etc/samba | |
mv smb.conf smb.conf.bak | |
wget --no-cache https://gist.githubusercontent.com/marcelocmenezes/e40671c3eb0145ebfc1afb44a6c7c18b/raw/106b91ac6ed87d0b5d8bb13c6793b6c27150cc02/smb.conf |
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
#Atualizar a Lista de repositórios. | |
sudo apt-get update | |
#Atualizar toda Distro. | |
sudo apt-get -f dist-upgrade ou update-manager -d -c | |
#Atualizar Pacotes. | |
sudo apt-get upgrade | |
#Procurar arquivos corrompidos. |
NewerOlder