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 x509 -noout -modulus -in /etc/pki/tls/certs/www.example.com.crt | openssl md5 | |
openssl rsa -noout -modulus -in /etc/pki/tls/private/www.example.com.key | openssl md5 |
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
ps -ylC httpd --sort:rss | awk '{sum+=$8; ++n} END {print "Tot="sum"("n")";print "Avg="sum"/"n"="sum/n/1024"MB"}' |
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
aws iam get-server-certificate --server-certificate-name wildcard.example.com |
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
aws ec2 describe-instances --query 'Reservations[*].Instances[*].PrivateIpAddress' --output text | sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4 | |
# or | |
aws ec2 describe-instances --query 'Reservations[*].Instances[*]' --output text | less |
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 reset origin/<branch> --hard |
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
s3cmd setacl s3://bucket/path/to/file --acl-public | |
s3cmd info s3://bucket/path/to/file | |
s3cmd setacl s3://bucket/path/to/file --acl-private |
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
file_put_contents('/tmp/foo/bar.txt', print_r(, true), FILE_APPEND); | |
file_put_contents('/tmp/foo/bar.txt', "5:\n\n", FILE_APPEND); |
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
curl -XDELETE 'http://localhost:9200/graylog2_0/' |
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
:filetype indent on | |
:set filetype=html | |
:set smartindent | |
gg=G |
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
# Backup | |
dconf dump /org/cinnamon/ > cinnamon-dconf-settings.txt | |
# Reset Cinnamon | |
dconf reset -f /org/cinnamon/ | |
# Restore | |
dconf load /org/cinnamon/ < cinnamon-dconf-settings.txt |