create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
#!/bin/sh | |
# | |
# Postgresql backup script | |
# http://www.bitweaver.org/wiki/pg_backup+PostgreSQL+backup+script | |
# | |
# Author | |
# | | |
# +-- speedboy (speedboy_420 at hotmail dot com) | |
# +-- spiderr (spiderr at bitweaver dot org) | |
# +-- flexiondotorg (code at flexion dot org) |
-Dcom.sun.management.jmxremote | |
-Dcom.sun.management.jmxremote.port=8086 | |
-Dcom.sun.management.jmxremote.ssl=false | |
-Dcom.sun.management.jmxremote.authenticate=false |
#!/bin/bash | |
#### | |
# Split MySQL dump SQL file into one file per table | |
# based on http://blog.tty.nl/2011/12/28/splitting-a-database-dump | |
#### | |
if [ $# -lt 1 ] ; then | |
echo "USAGE $0 DUMP_FILE [TABLE]" | |
exit |
# dump all databases once every 24 hours | |
45 4 * * * root nice -n 19 su - postgres -c "pg_dumpall --clean" | gzip -9 > /var/local/backup/postgres/postgres_all.sql.gz | |
# vacuum all databases every night (full vacuum on Sunday night, lazy vacuum every other night) | |
45 3 * * 0 root nice -n 19 su - postgres -c "vacuumdb --all --full --analyze" | |
45 3 * * 1-6 root nice -n 19 su - postgres -c "vacuumdb --all --analyze --quiet" | |
# re-index all databases once a week | |
0 3 * * 0 root nice -n 19 su - postgres -c 'psql -t -c "select datname from pg_database order by datname;" | xargs -n 1 -I"{}" -- psql -U postgres {} -c "reindex database {};"' |
rds-modify-db-parameter-group {param-group-name} \ | |
--parameters="name=character_set_server, value=utf8, method=pending-reboot" \ | |
--parameters="name=collation_server, value=utf8_general_ci, method=pending-reboot" \ | |
--parameters="name=tmp_table_size, value={DBInstanceClassMemory/16}, method=pending-reboot" \ | |
--parameters="name=max_heap_table_size, value={DBInstanceClassMemory/16}, method=pending-reboot" \ | |
--parameters="name=query_cache_type, value=1, method=pending-reboot" \ | |
--parameters="name=query_cache_size, value=131072, method=pending-reboot" \ | |
--parameters="name=table_open_cache, value=2500, method=pending-reboot" \ | |
--parameters="name=join_buffer_size, value={DBInstanceClassMemory/64}, method=pending-reboot" \ | |
--parameters="name=thread_cache_size, value={DBInstanceClassMemory/12582880}, method=pending-reboot" \ |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
This playbook has been removed as it is now very outdated. |
#!/bin/bash | |
# | |
# This script requires xpath to parse part of the dnscurl.pl output | |
# on CentOS/RedHat/Amazon Linux: | |
# | |
# sudo yum install perl-XML-XPath | |
# | |
# also, dnscurl.pl (from http://aws.amazon.com/code/Amazon-Route-53/9706686376855511) | |
# expects your secrets to be in ~/.aws-secrets | |
# using a file format like this (from http://dmz.us/wp/wp-content/uploads/r53/aws-secrets.txt) |
curl -v -X GET -H "range: bytes=1-8" http://localhost:8080/bbb/test
curl -v -X GET -H "range: bytes=10-" http://localhost:8080/bbb/test
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |