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
| global: | |
| enabled: false | |
| name: consul | |
| datacenter: riddhi-aws-114beta | |
| image: "hashicorp/consul-enterprise:1.14.0-beta1-ent" | |
| acls: | |
| manageSystemACLs: true | |
| bootstrapToken: | |
| secretName: riddhi-aws-114beta-hcp | |
| secretKey: bootstrapToken |
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
| ➜ consul connect envoy -proxy-id web-sidecar-proxy -bootstrap | |
| { | |
| "admin": { | |
| "access_log_path": "/dev/null", | |
| "address": { | |
| "socket_address": { | |
| "address": "127.0.0.1", | |
| "port_value": 19000 | |
| } | |
| } |
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
| ✗ cat catalog_service_register.json | |
| { | |
| "Datacenter": "dc1", | |
| "Node": "synthetic-node1", | |
| "Address": "127.0.0.1", | |
| "TaggedAddresses": { | |
| "lan": "127.0.0.1", | |
| "wan": "10.0.10.10" | |
| }, | |
| "NodeMeta": { |
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
| { | |
| "Kind": "proxy-defaults", | |
| "Name": "global", | |
| "Mode": "direct", | |
| "Config": { | |
| "local_connect_timeout_ms": 1000, | |
| "handshake_timeout_ms": 10000 | |
| } | |
| } |
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
| def missing_numbers(numbers: list) -> str: | |
| """ | |
| Returns a comma-separated number/range of numbers which are missing in the specified list | |
| # O(n) solution; n - size of the input list of numbers | |
| """ | |
| i = 0 | |
| lnumbers = len(numbers) | |
| result = '' |
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 sshtunnel import SSHTunnelForwarder | |
| import pymysql | |
| with SSHTunnelForwarder( | |
| ('ec2-52-202-194-76.public-ec2-instance.amazonaws.com'), | |
| ssh_username="ec2-user", | |
| ssh_pkey="~/ssh-tunnel-rds.pem", | |
| remote_bind_address=('private-rds-instance.ckfkidfytpr4.us-east-1.rds.amazonaws.com', 3306) | |
| ) as tunnel: | |
| print("****SSH Tunnel Established****") |
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 sshtunnel import SSHTunnelForwarder | |
| import pymysql | |
| with SSHTunnelForwarder( | |
| ('ec2-52-202-194-76.public-ec2-instance.amazonaws.com'), | |
| ssh_username="ec2-user", | |
| ssh_pkey="~/ssh-tunnel-rds.pem", | |
| remote_bind_address=('private-rds-instance.ckfkidfytpr4.us-east-1.rds.amazonaws.com', 3306) | |
| ) as tunnel: | |
| print("****SSH Tunnel Established****") |
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 sshtunnel import SSHTunnelForwarder | |
| import pymysql | |
| with SSHTunnelForwarder( | |
| ('ec2-52-202-194-76.public-ec2-instance.amazonaws.com'), | |
| ssh_username="ec2-user", | |
| ssh_pkey="~/ssh-tunnel-rds.pem", | |
| remote_bind_address=('private-rds-instance.ckfkidfytpr4.us-east-1.rds.amazonaws.com', 3306) | |
| ) as tunnel: | |
| print("****SSH Tunnel Established****") |