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 | |
# Para o script se qualquer comando falhar | |
set -e | |
# Caminho para o arquivo de log | |
readonly LOG_FILE="/var/log/dockge_backup.log" | |
# Variáveis de configuração (somente leitura para evitar alterações acidentais) | |
readonly TMP_DIR="/tmp/rclone/dockge" # Diretório temporário para backup local |
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
use base64::{engine::general_purpose, Engine as _}; | |
use crypto::aes::{cbc_decryptor, cbc_encryptor, KeySize}; | |
use crypto::blockmodes::PkcsPadding; | |
use crypto::buffer::{BufferResult, ReadBuffer, RefReadBuffer, RefWriteBuffer, WriteBuffer}; | |
use crate::errors::AppError; // use your own error type | |
pub fn encrypt_str<T: AsRef<str>>( | |
data_to_encrypt: T, | |
key: &[u8], |
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
[package] | |
name = "testcontainers-sample" | |
version = "0.1.0" | |
edition = "2021" | |
[dev-dependencies] | |
async_once = "0.2.6" | |
aws-sdk-s3 = "0.28.0" | |
ctor = "0.2.4" | |
lazy_static = "1.4.0" |
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 | |
set -eu | |
DIR='./files/ssh' | |
OUTPUT_FILE='./files/ssh.tar.gz' | |
while getopts do: flag | |
do | |
case "${flag}" in |
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
/.vscode | |
/.git | |
/devops | |
/node_modules | |
/coverage | |
/devops | |
/dist | |
/tests | |
/assets | |
.editorconfig |
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
upstream api { | |
server 127.0.0.1:3000 max_fails=0; | |
} | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name dominio-aqui; |
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
server { | |
listen 80; | |
listen [::]:80; | |
server_name api.x.app; | |
rewrite_log on; | |
# security | |
# include shared.d/security.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
.vscode/ | |
.yarn/ | |
dist/ | |
coverage/ | |
public/ |
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
/.yarn/** | |
/dist/** | |
/node_modules/** |
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
# https://docs.aws.amazon.com/pt_br/acm/latest/userguide/acm-regions.html | |
resource "aws_acm_certificate" "this" { | |
provider = aws.virginia # need to be created at virginia (cloudfront bizarre) | |
domain_name = local.host | |
subject_alternative_names = local.alias | |
validation_method = "DNS" | |
lifecycle { | |
create_before_destroy = true |
NewerOlder