I hereby claim:
- I am ameng on github.
- I am ameng (https://keybase.io/ameng) on keybase.
- I have a public key whose fingerprint is 89A4 7625 D774 878B 63E1 35ED 84F1 2958 A261 3F08
To claim this, I am signing this object:
| def solution(A): | |
| highest_distance = 0 | |
| earliest_seen = {} | |
| for index, value in enumerate(A): | |
| if earliest_seen.get(value): | |
| distance = index - earliest_seen[value] + 1 | |
| if distance > highest_distance: | |
| highest_distance = distance | |
| else: | |
| earliest_seen[value] = index + 1 |
| { | |
| "app": { | |
| "instance_type": "m4.large", | |
| "app_description": "Edge Forrest Demo application" | |
| }, | |
| "asg": { | |
| "min_inst": 2, | |
| "max_inst": 5 | |
| } | |
| } |
| - name: EC2 CPU Utilization | |
| query: avg(last_1h):avg:aws.ec2.cpuutilization by {host} > 95 | |
| message: EC2 CPU utilization is {{comparator}} {{threshold}} on host {{host.ip}}. |
| job('example-job') { | |
| wrappers { | |
| colorizeOutput() | |
| preBuildCleanup() | |
| } | |
| logRotator { | |
| numToKeep(10) | |
| } | |
| steps { | |
| shell('./gradlew clean build') |
| #!/usr/bin/env python | |
| from argparse import ArgumentParser | |
| from boto.ec2 import EC2Connection | |
| from boto.ec2.elb import ELBConnection | |
| from socket import gethostbyname | |
| from sys import argv | |
| class NodeLookup: |
| #!/usr/bin/env python | |
| import time | |
| import os | |
| from boto import utils, connect_ec2 | |
| ELASTIC_IPS = os.environ['ELASTIC_IPS'].split(', ') | |
| NUMBER_OF_TRIES = 5 | |
| metadata = utils.get_instance_metadata() |
I hereby claim:
To claim this, I am signing this object:
Basic stuff:
sudo apt-get update -y
sudo apt-get install -y bundler curl git guake network-manager-openvpn network-manager-openvpn-gnome openvpn python python-dev python-virtualenv ruby shellcheck virtualbox vagrant vim xclip
Slack:
sudo apt-add-repository -y ppa:rael-gc/scudcloud
sudo apt-get update -y
| import json | |
| import sys | |
| import os | |
| try: | |
| import readline | |
| except ImportError: | |
| print("Module readline not available.") | |
| else: | |
| import rlcompleter |
| data := make(map[string]string) | |
| data["a"] = "a" | |
| data["b"] = "b" | |
| data["c"] = "c" | |
| data["d"] = "d" |