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
Parece que você quer redimensionar um disco ou partição em um sistema Ubuntu. Seu disco /dev/sda tem 200 GB, e você está usando LVM (Logical Volume Management) com a partição /dev/mapper/ubuntu--vg-ubuntu--lv de 99 GB. | |
Para aumentar o tamanho do volume lógico LVM: | |
Redimensionar a partição no disco: | |
Primeiro, use fdisk ou parted para redimensionar a partição física que contém o LVM. Como você tem espaço não alocado no disco (/dev/sda), você pode usar parted para estender a partição /dev/sda3. | |
bash | |
Copiar código | |
sudo parted /dev/sda | |
(parted) resizepart 3 100% |
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
SELECT PCPREST.NUMTRANSVENDA || '/' || PCPREST.PREST AS codigo, | |
PCUSUARI.tipovend, | |
PCCLIENT.TIPOFJ AS tipoCliente, | |
REGEXP_REPLACE(PCCLIENT.CGCENT, '[^0-9]', '') AS documentoCliente, | |
'DISDAL' AS nomeOrigem, | |
NULL AS token, | |
JSON_OBJECT( | |
'tipoRepresentante' VALUE PCUSUARI.TIPOVEND, | |
'documentoRepresentante' VALUE REGEXP_REPLACE(DECODE(PCUSUARI.tipovend, | |
'J', PCUSUARI.CGC, |
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
with PRODUTOS as (SELECT NUMPED, | |
json_arrayagg( | |
JSON_OBJECT( | |
'codigoSistemaGestao' VALUE CODPROD, | |
'codigoSistemaGestao' VALUE CAST(ABS(QT) AS DECIMAL(18, 2)), | |
'codigoSistemaGestao' VALUE 'N', | |
'codigoSistemaGestaoGrupoProduto' VALUE 'DISDAL' | |
) | |
RETURNING CLOB | |
) AS DADOS |
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
CREATE OR REPLACE VIEW V_INTEGRACAO_CLIENTES AS | |
with REFERENCIAS as( | |
SELECT | |
CODCLI, | |
json_arrayagg( | |
JSON_OBJECT( | |
'preferencial' VALUE NULL, | |
'nome' VALUE PCCLIREF.CONTATOREFER, | |
'cargo' VALUE NULL, | |
'telefone' VALUE PCCLIREF.TELREFER, |
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 | |
# Atualiza os repositórios e pacotes | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
# Instalação de pacotes básicos | |
sudo apt-get install -y curl git vim | |
# Configuração do Git |
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 /home/ubuntu/evolusom/ | |
status=$(./bin/cron status) | |
if echo "$status" | grep -q "FAIL"; then | |
echo "O serviço cron está inativo. Iniciando o cron..." | |
./bin/cron start | |
else | |
echo "O serviço cron já está em execução." |
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 | |
# Pasta contendo as fotos | |
pasta_fotos="100CANON" | |
# Lista todas as fotos na pasta (formatos JPG e CR2) | |
fotos_jpg=("$pasta_fotos"/*.jpg) | |
fotos_cr2=("$pasta_fotos"/*.cr2) | |
videos=("$pasta_fotos"/*.mp4) | |
fotos=("${fotos_jpg[@]}" "${fotos_cr2[@]}" "${videos[@]}") |
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 | |
# Executa a renovação do certificado usando o Certbot | |
certbot renew --quiet | |
# Verifica o status do certificado renovado | |
if [ $? -eq 0 ]; then | |
# Reinicia o Nginx se a renovação for bem-sucedida | |
service nginx restart | |
else |
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
ffmpeg -i completo.mp3 -vn -acodec copy -ss 00:06:20 -to 00:21:13 'pedacao.mp3' |
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 | |
RED="\e[31m" | |
ENDCOLOR="\e[0m" | |
for file in ./nginx/sites-available/*.conf; do | |
domain=$(basename "$file" .conf | cut -d'-' -f2) | |
if [ ! -d "/etc/letsencrypt/live/$domain" ]; then | |
certbot certonly --standalone -d "$domain" --agree-tos --non-interactive --register-unsafely-without-email |
NewerOlder