Source: http://www.syahzul.com/2016/04/06/how-to-install-oci8-on-ubuntu-14-04-and-php-5-6/
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 |
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
# docker ps -a = Get all containers | |
# grep Exited = Filter the Exited Containers | |
# awk awk '{print $1}' = Filter the first column (ID) | |
docker rm $(docker ps -a | grep Exited | awk '{print $1}') |
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
country=BR | |
update_config=1 | |
ctrl_interface=/var/run/wpa_supplicant | |
network={ | |
ssid="networkName" | |
psk="password" | |
key_mgmt=WPA-PSK | |
} |
Command | Description |
---|---|
git init |
Initialize a local Git repository |
git clone ssh://git@github.com/[username]/[repository-name].git |
Create a local copy of a remote repository |
With a clean master branch checked out, you can create a task branch by typing:
NewerOlder