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
#stop all containers: | |
docker kill $(docker ps -q) | |
#remove all containers | |
docker rm $(docker ps -a -q) | |
#remove all old containers | |
docker rm $(docker ps --filter "status=exited" -q) | |
#remove all docker images |
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
[suhosin] | |
; Logging Configuration | |
suhosin.log.syslog.facility = 9 | |
suhosin.log.use-x-forwarded-for = Off | |
; Executor Options | |
suhosin.executor.max_depth = 0 | |
suhosin.executor.include.max_traversal = 4 | |
suhosin.executor.disable_emodifier = On | |
suhosin.executor.allow_symlink = Off |
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
sudo fdisk -l | |
sudo mount /dev/sdax /mnt | |
sudo mount --bind /dev /mnt/dev | |
sudo mount --bind /dev/pts /mnt/dev/pts | |
sudo mount --bind /proc /mnt/proc | |
sudo mount --bind /sys /mnt/sys | |
sudo chroot /mnt |
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 | |
LISTA="/opt/sync-mail/list.txt" | |
LISTA_TMP="/tmp/list" | |
HOST_ORIGEM="xxx.xxx.xxx.xxx" | |
HOST_DESTINO="xxx.xxx.xxx.xxx" | |
cat ${LISTA}|grep -v "^#" | sed '/^ *$/d' > ${LISTA_TMP} | |
while IFS=: read usuario nome senha;do |
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
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
// See also: http://www.paulund.co.uk/change-url-of-git-repository | |
$ cd $HOME/Code/repo-directory | |
$ git remote rename origin bitbucket | |
$ git remote add origin https://github.com/user/awesome-new-repo.git | |
$ git branch --set-upstream-to=origin/master master | |
$ git push origin master | |
$ git pull origin master --allow-unrelated-histories |
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
<IfModule proxy_ajp_module> | |
ProxyPass "/" "ajp://127.0.0.1:10001/" | |
</IfModule> |
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
## | |
## to test: | |
## logrotate -d /etc/logrotate.conf | |
## | |
## to enforce: | |
## logrotate -v -f /etc/logrotate.conf | |
## | |
/data/kafka/log/*.log { | |
daily |
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 | |
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
set -e | |
set -o pipefail | |
FROM="/tmp/FROM/" | |
TO="/tmp/TO/" | |
DATE=$(date '+%d-%m-%Y %H:%M:%S') | |
LOG_FILE=/scripts/rsync-txt-files.log |
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
# Log Rotate by initialising logger from the app | |
#Way one | |
# reference : http://ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.html#method-c-new | |
# This one from Atinder Singh https://medium.com/@atinders/easy-log-rotation-with-rails-5-7b8d3c173461 | |
# config/environments/production.rb | |
Rails.application.configure do |
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
<? | |
echo "I am running as user="; | |
system("whoami"); | |
echo "<P>I can write here= "; | |
system("pwd"); | |
$fname="write_test.txt"; | |
if (file_exists($fname)) { | |
echo "<P> I found file $fname and will delete it"; | |
unlink($fname); | |
echo "...Done"; |