One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| #!/bin/sh | |
| # Generate self signed root CA cert | |
| openssl req -nodes -x509 -newkey rsa:2048 -keyout ca.key -out ca.crt -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=root/CN=`hostname -f`/emailAddress=kevinadi@mongodb.com" | |
| # Generate server cert to be signed | |
| openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=server/CN=`hostname -f`/emailAddress=kevinadi@mongodb.com" | |
| # Sign the server cert |
output {
rabbitmq {
vhost => 'logstash'
exchange => 'my_exchange'
exchange_type => 'direct'
host => 'logstashmq.example.com'
key => 'my_key'
| from copy import deepcopy | |
| def flatten_list(nested_list): | |
| """Flatten an arbitrarily nested list, without recursion (to avoid | |
| stack overflows). Returns a new list, the original list is unchanged. | |
| >> list(flatten_list([1, 2, 3, [4], [], [[[[[[[[[5]]]]]]]]]])) | |
| [1, 2, 3, 4, 5] | |
| >> list(flatten_list([[1, 2], 3])) | |
| [1, 2, 3] |