Skip to content

Instantly share code, notes, and snippets.

{"vhosts": [{"name": "/"}], "users": [{"hashing_algorithm": "rabbit_password_hashing_sha256", "name": "rrn9x37btduh9mf53skfkcdpy9c1eepcnv74n8h4", "password_hash": "fgfqERZvqOD6g36bwk49qQ7FJVfRY4NxdI1BKXiKCTLarWVS", "tags": "administrator"}], "permissions": [{"user": "rrn9x37btduh9mf53skfkcdpy9c1eepcnv74n8h4", "vhost": "/", "configure": ".*", "write": ".*", "read": ".*"}], "policies": [{"name": "logs_queue_message_policy", "vhost": "/", "pattern": "^cloudify-log$", "priority": 100, "apply-to": "queues", "definition": {"message-ttl": 1200000, "max-length": 1000000, "ha-mode": "exactly","ha-params":2, "ha-sync-mode": "automatic", "ha-sync-batch-size": 50}}, {"name": "events_queue_message_policy", "vhost": "/", "pattern": "^cloudify-events$", "priority": 100, "apply-to": "queues", "definition": {"message-ttl": 1200000, "max-length": 1000000, "ha-mode": "exactly","ha-params":2, "ha-sync-mode": "automatic", "ha-sync-batch-size": 50}}, {"name": "default_policy", "vhost": "/", "pattern": "^", "priority": 1, "apply-to
@eveland
eveland / self-signed-certificate-key-ca.md
Last active March 25, 2020 14:10 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate, Key and CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -out rootCA.key 4096
@eveland
eveland / postgres-cheatsheet.md
Created December 12, 2019 17:12 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@eveland
eveland / .htaccess - Firewall
Last active October 14, 2017 12:01
WordCamp 2017
# 6G FIREWALL/BLACKLIST
# @ https://perishablepress.com/6g/
# Please remember this requires testing with YOUR site!!
# 6G:[QUERY STRINGS]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} (eval\() [NC,OR]
RewriteCond %{QUERY_STRING} (127\.0\.0\.1) [NC,OR]
RewriteCond %{QUERY_STRING} ([a-z0-9]{2000,}) [NC,OR]
@eveland
eveland / .user.ini for Wordpress
Created October 9, 2015 17:11
.user.ini for Wordpress
memory_limit = 128M
upload_max_filesize = 1000M
post_max_size=1005M
max_execution_time=120
max_input_time=120
@eveland
eveland / .htaccess
Last active December 23, 2015 16:41
.htaccess
#Require SSL
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>