Skip to content

Instantly share code, notes, and snippets.

View update.sh
#!/bin/bash
apt-get -y update && apt-get -y dist-upgrade
apt-get -y install update-manager-core
sed -i 's/Prompt=lts/Prompt=normal/g' /etc/update-manager/release-upgrades
apt-get -y update && apt-get -y upgrade && apt-get -y dist-upgrade
apt-get -y autoremove && apt-get -y clean && apt-get -y autoclean
View gist:28f563efc2bfa5735815159fec09336a
### Keybase proof
I hereby claim:
* I am rdeavila on github.
* I am rodrigo (https://keybase.io/rodrigo) on keybase.
* I have a public key ASCYrtcrU6zIhbaEwUdjftM4qxWtmiB9KPek57Us4SXrCQo
To claim this, I am signing this object:
View time_curl.sh
#!/bin/bash
CAMPANHA_ID="1"
ENTREGADOR_ID="teste_benchmark"
PRIVATE_TOKEN="wZrSb..."
curl \
-w "@time_curl.txt" \
-X GET \
-s "http://127.0.0.1:3000/i/v2/campanhas/$CAMPANHA_ID/mensagens?entregador_id=$ENTREGADOR_ID" \
View gist:0904027d40c120af8d2cd78378d34712
### Keybase proof
I hereby claim:
* I am rdeavila on github.
* I am rodrigo (https://keybase.io/rodrigo) on keybase.
* I have a public key ASA3xr4r_NTINFq6BmGtgLZqZby2zQDWboJuSDtUNmquZAo
To claim this, I am signing this object:
@rdeavila
rdeavila / swap-updates-dependencias.sh
Last active June 3, 2019 16:12
swap, updates e dependências
View swap-updates-dependencias.sh
#!/bin/bash
# Swap
sudo -u root -H fallocate -l 4G /swapfile
sudo -u root -H chmod 600 /swapfile
sudo -u root -H mkswap /swapfile
sudo -u root -H swapon /swapfile
sudo -u root -H echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
sudo -u root -H echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
sudo -u root -H echo 'vm.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf
sudo -u root -H sysctl -p
View testa-parametros.sh
#!/bin/bash
PARAMETRO_1=${PARAMETRO_1:-não informado}
PARAMETRO_2=${PARAMETRO_2:-não informado}
echo ''
echo "Parâmetro 1: $PARAMETRO_1"
echo "Parâmetro 2: $PARAMETRO_2"
echo ''
exit 0
@rdeavila
rdeavila / teste-email.sh
Last active August 3, 2016 14:48
DE="email" PARA="email" bash <(curl -fsSL http://syo.net.br/lero-mail)
View teste-email.sh
#!/bin/bash
DE=${DE:-rodrigo@syo.net.br}
PARA=${PARA:-rodrigo@avila.net.br}
ASSUNTO='Lero por email'
CORPO="Este é o seu LeroMail de hoje:
\"O incentivo ao avanço tecnológico, assim como o consenso sobre a necessidade de qualificação aponta para a
melhoria dos relacionamentos verticais entre as hierarquias. Percebemos, cada vez mais, que o desenvolvimento
contínuo de distintas formas de atuação é uma das consequências de todos os recursos funcionais envolvidos.
@rdeavila
rdeavila / create-startssl-cert-bundle.sh
Last active August 26, 2015 22:30 — forked from david50407/create-startssl-cert-bundle.sh
Read a SSL certificate issued by StartSSL and bundle intermediate certificates into it so it works everywhere
View create-startssl-cert-bundle.sh
#!/bin/bash
set -eo pipefail
cert_file="$1"
if [ -z "$cert_file" ]; then
echo "Usage: create-startssl-cert-bundle CERTIFICATE_FILE" >&2
echo >&2
echo "Bundles StartSSL's intermediate certs and writes combined certificate to stdout" >&2
exit 1
@rdeavila
rdeavila / install.sh
Last active August 29, 2015 14:26
NOME="Seu Nome" EMAIL="seu@email.com" bash <(curl -fsSL https://rawgit.com/rdeavila/869f870b0bb9f8ae24fb/raw/install.sh)
View install.sh
#!/bin/bash
clear
echo
if [ -z "$NOME" ]; then
echo "Você precisa informar o seu nome, do mesmo modo como"
echo "está cadastrado no seu perfil do GitLab."
echo
echo "Você pode fazer isso executando este script do seguinte modo:"
View install.sh
#!/bin/bash
clear
echo
NOME="Rodrigo de Avila"
EMAIL="rodrigo@avila.net.br"
REPO="git@git.corujalab.com.br:antecipador/antecipador-rails.git"
if [ ! -f .ssh/id_rsa ]; then