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
| screen -ls | tail -n +2 | head -n -2 | awk '{print $1}'| xargs -I{} screen -S {} -X quit |
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
| select group_concat(concat('KILL ',id,';') separator ' ') from information_schema.processlist where time > 10; |
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
| \Magento\Framework\App\ObjectManager::getInstance() | |
| ->get(\Psr\Log\LoggerInterface::class)->info('message'); |
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 | |
| DATE="$(date +%Y%m%d)" | |
| log="/var/log/backups.log" | |
| echo "" >> $log | |
| /bin/date >> $log | |
| echo "---------------------------------------------" >> $log | |
| echo "DB Backup" >> $log | |
| echo "" >> $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
| netstat -an|awk '/tcp/ {print $6}'|sort|uniq -c | |
| netstat -a | grep tcp | egrep "http|https" |
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
| git branch -vv | grep -E "desaparecido|gone" | awk '{print $1}' | xargs -n1 git branch -d |
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
| openssl pkey -in privateKey.key -pubout -outform pem | sha256sum | |
| openssl x509 -in certificate.crt -pubkey -noout -outform pem | sha256sum | |
| openssl req -in CSR.csr -pubkey -noout -outform pem | sha256sum | |
| 1. Extract .key from .pem: | |
| `openssl pkey -in cert.pem -out cert.key` | |
| 2. Extract .crt from .pem: |
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 du -shc ./* |
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
| docker run --rm -i -t -v $1:/from -v $2:/to alpine ash -c "cd /from ; cp -av . /to" |
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
| alias create_password="</dev/urandom tr -dc '1234567890!@#$%&;:.-_[]qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNMG' | head -c16; echo ''" |