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
#!/bin/bash | |
cd /path/autosync | |
if [ ! -z "$1" ]; then | |
if [ -d $1 ] && [ $1 != "." ]; then | |
cd "$1" | |
pwd | |
git pull | |
fi | |
exit 0 | |
fi |
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
#!/bin/bash | |
# This script syncs (i.e. makes git pull) on a specified directory or, se no | |
# parameter was specified, in all the subdirectories that are git projects. | |
# | |
# Usage: | |
# ./auto_sync_git.sh directory_of_my_project | |
# ./auto_sync_git.sh | |
# An alias to the git binary |
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
if (!function_exists('array_rows_to_columns')) { | |
/** | |
* rows to columns. | |
* | |
* @param array $array | |
* @return array | |
*/ | |
function array_rows_to_columns(array $data) | |
{ | |
$newArray = []; |
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
#!/bin/bash | |
API_KEY="SUA CHAVE SECRETA AQUI" | |
API_EMAIL="seu email" | |
ZONE_ID="ZONA DNS" | |
DOMINIO="dominio.com" | |
#Lista os registros, necessário para pegar o id para alterar a zona DNS | |
#curl -X GET "https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/dns_records" \ |
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
#!/bin/bash | |
DIR="/DIRETORIO_ROOT_DO_SEU_SITE" | |
EMAIL="[email protected]" | |
DOMINIO="SEU-DOMINIO.COM" | |
sudo ./certbot-auto certonly --webroot --webroot-path \ | |
${DIR} \ | |
--renew-by-default --email ${EMAIL} --text --agree-tos \ | |
-d ${DOMINIO} \ | |
-d www.${DOMINIO} |
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
#listen 443 ssl http2; | |
listen [::]:443 ssl http2; | |
server_name SEU-DOMINIO.COM www.SEU-DOMINIO.COM; | |
if ($ssl_protocol = "") { | |
rewrite ^ https://$server_name$request_uri? permanent; | |
} | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
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
doOnSaved (entity) { | |
entity = prepareEntity(entity) | |
const entities = this.entities.data | |
const current = entities.find(row => row.id === entity.id) | |
if (current === undefined) { | |
entities.push(entity) | |
} | |
else { | |
entities[entities.indexOf(current)] = entity |
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
<template> | |
<div> | |
</div> | |
</template> | |
<script> | |
/** | |
* base: https://github.com/finpo/vue2-recaptcha-invisible | |
*global window document | |
*/ |
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
// Controller | |
// Metodo do controle que faz a chacagem | |
protected function checkRecaptcha($token, $ip) | |
{ | |
$response = (new Client)->post('https://www.google.com/recaptcha/api/siteverify', [ | |
'form_params' => [ | |
'secret' => config('services.recaptcha.secret'), | |
'response' => $token, |
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
<?php | |
'minio' => [ | |
'driver' => 's3', | |
'endpoint' => env('MINIO_ENDPOINT', 'https://127.0.0.1:9000'), | |
'use_path_style_endpoint' => true, | |
'key' => env('AWS_KEY'), | |
'secret' => env('AWS_SECRET'), | |
'region' => env('AWS_REGION'), | |
'bucket' => env('AWS_BUCKET'), | |
], |