# sudo ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
# sudo cat /etc/sysconfig/clock
ZONE="America/New_York"
UTC=true
# sudo reboot
Collect metrics from Docker Host:
docker run -d -p 9104:9104 -v /sys/fs/cgroup:/cgroup -v /var/run/docker.sock:/var/run/docker.sock prom/container-exporter
Server:
Simple and easy way to compare old and new files especially working with git merge.
vimdiff file1 file2
vim -d file1 file2
Commands:
]c - next diff
Master
# Environment Files:
/opt/mesosphere/etc/cfn_signal_metadata
/opt/mesosphere/environment
# Run
/opt/mesosphere/bin/cfn-signal
Here's more information on configuring Racoon and Quagga:
Part 1: https://www.youtube.com/watch?v=vfd2SiXVPZ8 Part 2: https://www.youtube.com/watch?v=RLX1twUKeNY
http://www.cloudhowto.org/amazon-vpc-with-linux-computer-racoon-quagga-ipsec-as-vpn-solution/
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 ecr get-login > /tmp/key | |
| sh -x /tmp/key |
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
| from flask import Flask | |
| from flask_sslify import SSLify | |
| """ | |
| Option 1 : (pip install pyopenssl) | |
| from OpenSSL import SSL | |
| context = SSL.Context(SSL.SSLv23_METHOD) | |
| context.use_privatekey_file('web.key') | |
| context.use_certificate_file('web.crt') |
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
| import requests | |
| import json | |
| url = "https://graph.facebook.com/v2.4/threat_indicators" | |
| params = { | |
| "type": "IP_ADDRESS", | |
| "text": "proxy", | |
| "access_token": "XXXX|YYYY", | |
| "limit": "1000", | |
| "after": "dummy" |
Folder structure
/project
|---> /terraform
| |--> /_env/aws # .tfvars file
| |--> /aws # .tf files
|---> /packer
|---> bin/gen_ssh.sh