sudo apt-get install libapache2-mod-proxy-html
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 | |
# Exemplo no terminal | |
pidof -xs ${1} 1>/dev/null 2>&1 || echo " ==> Script ${1} não está rodando." | |
# Exemplo no crontab | |
# 00 18 * * * pidof -x script.sh || script.sh --iniciar |
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
/** | |
* DUMP | |
* | |
* Dumps a variable in a readable form to the console, this is a recursive function | |
* so be careful of nested references that may cause it to overflow... (untested for that) | |
* | |
* @v ANYTHING [Any variable] | |
* @name STRING [The name of the variable, optional, used internally when looping objects and arrays] | |
* @spacing STRING [The prefix spacing, used internally when looping objects and arrays] | |
*/ |
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 | |
# | |
# Para usar em uma vm: | |
# adicionar ao /etc/hosts | |
# 192.168.1.158 macmini.avila.net.br | |
# | |
# Para desmontar: | |
# fusermount -u /home/rodrigo/www | |
# |
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
-- Rápido | |
update syo_campanha set ds_enderecoemail = null; | |
update syo_contaemail set ds_email = null; | |
update syo_contatoemail set ds_email = null; | |
update syo_empresa set ds_email = null, ds_smtpemail = null, ds_usuarioemail = null; | |
update syo_faleconosco set ds_email = null; | |
update syo_motivoinsatisfacao set ds_emails = null; | |
update syo_newsletter set ds_email = null; | |
update syo_pergunta set ds_emails = null; |
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 | |
e.Nome AS nome_empresa, | |
(Case | |
WHEN c.tipo_pessoa = 'J' THEN c.Nome_Fantasia | |
ELSE c.Nome | |
END ) AS nome_ordem, | |
c.* | |
FROM | |
LD_Cliente c, | |
LD_Empresa e |
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 | |
# Lê os arquivos abertos, e procura por programas que estejam usando | |
# a biblioteca do OpenSSL. | |
sudo lsof +c 0 | grep -w DEL | awk '1 { print $1 ": " $NF }' | grep libssl | sort -u | |
# Depois de atualizar, o comando abaixo mostra os serviços que precisam ser | |
# reiniciados. Enquanto não reiniciar, eles ainda usarão a versão antiga: | |
sudo find /proc -maxdepth 2 -name maps -exec grep -HE '/libssl\.so.* \(deleted\)' {} \; | cut -d/ -f3 | sort -u | xargs --no-run-if-empty ps uwwp |
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 | |
# | |
# ATENÇÃO: Estas regras devem ser usadas apenas como medida temporária, ou de teste, | |
# visto que a atualização dos servidores ainda é altamente recomendada. | |
# A regra de log deve ser usada apenas para testar as regras de firewall antes de serem | |
# usadas em um servidor de produção. | |
# | |
# Use estas regras por sua conta e risco! | |
# | |
# Para logar requisições no /var/log/kern.log: |
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
-- Para saber o tamanho de todas as bases de dados: | |
SELECT pg_database.datname, pg_size_pretty(pg_database_size(pg_database.datname)) AS size FROM pg_database; |
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
This is the mail system at host smtp300.frontmta.com.br. | |
I'm sorry to have to inform you that your message could not | |
be delivered to one or more recipients. It's attached below. | |
For further assistance, please send mail to postmaster. | |
If you do so, please include this problem report. You can | |
delete your own text from the attached returned message. |