I hereby claim:
- I am patrickpierson on github.
- I am patrickpierson (https://keybase.io/patrickpierson) on keybase.
- I have a public key ASB_i0tkFyaW6zEwSAroSeWcSBDmAcNkfr9ApIZabUkmtAo
To claim this, I am signing this object:
{ | |
"meta": { | |
"theme": "kendall" | |
}, | |
"basics": { | |
"name": "Patrick Pierson", | |
"summary": "Proficient in leading teams in collaborative, high-performing agile environments, focusing on common goals. Extensive expertise in SysOps, DevOps, and cloud platforms, particularly AWS. Skilled in developing, operating, and maintaining full-stack applications and distributed computing frameworks. Deep experience in Continuous Integration/Delivery using GitHub Actions, TeamCity, Docker, Puppet, Salt, CloudFormation, and Python. Military service background in intelligence operations and information technology, offering unique insights into systems, networks, and security to support mission success. Committed to optimizing computer systems and software to achieve greater efficiency and operational capability while reducing the total cost of ownership.", | |
"email": "[email protected]", | |
"location": { | |
"city": "Frederick, MD", |
import boto3 | |
import botocore | |
s3_client = boto3.client('s3') | |
s3_resource = boto3.resource('s3') | |
def get_bucket_names(): | |
bucket_names = [] | |
for bucket in s3_client.list_buckets().get('Buckets'): | |
bucket_names.append(bucket.get('Name')) |
import boto3 | |
sqs_client = boto3.client('sqs') | |
while True: | |
with open('messages.txt', 'a') as save_file: | |
messages = sqs_client.receive_message( | |
QueueUrl='https://sqs.us-east-1.amazonaws.com/1234567890123/example', | |
MaxNumberOfMessages=10 |
import geopy.distance | |
import glob2 | |
import json | |
from pprint import pprint | |
all_files = glob2.glob('data/**/*.json') | |
my_loc = (39.0, -77.0) | |
_5_miles = 0 |
import glob2 | |
import json | |
all_files = glob2.glob('data/**/*.json') | |
flight_reports = [] | |
altitude_reports = [] | |
speed_reports = [] | |
messages = 0 |
import boto3 | |
from pprint import pprint | |
source_queue = 'https://sqs.us-east-1.amazonaws.com/AWSACCOUNTID/source-queue' | |
dest_queue = 'https://sqs.us-east-1.amazonaws.com/AWSACCOUNTID/dest-queue' | |
import boto3 | |
client = boto3.client('sqs') |
# Add this to .bashrc | |
function default-aws() { | |
export AWS_PROFILE=$1 | |
} | |
# close terminal and reopen. Run the command default-aws <profile> and it will change the default profile used. | |
# This can replace the need to run --profile at the end of a aws cli command. Useful when using something like | |
# https://github.com/DualSpark/cloudformation-environmentbase which doesnt handle multiple profiles very well |
#!/bin/bash | |
SERVICE=service | |
CLUSTER=ecs-cluster | |
for i in $(aws ecs list-tasks --cluster $CLUSTER --service-name $(aws ecs list-services --cluster $CLUSTER | jq -r '.serviceArns[]' | grep $SERVICE) | jq -r '.taskArns[]'); do aws ec2 describe-instances --instance-ids $(aws ecs describe-container-instances --cluster $CLUSTER --container-instances $(aws ecs describe-tasks --cluster $CLUSTER --tasks $i | jq -r '.tasks[].containerInstanceArn') | jq -r '.containerInstances[].ec2InstanceId') | jq -r '.Reservations[].Instances[].NetworkInterfaces[].PrivateIpAddress'; done; |
I hereby claim:
To claim this, I am signing this object:
# cqlsh to vpc internal ip | |
cqlsh $(curl -s http://169.254.169.254/latest/meta-data/local-ipv4) | |
# remove exited containers | |
docker ps -a | grep Exit | cut -d ' ' -f 1 | xargs docker rm | |
# remove images marked with <none> | |
docker rmi $(docker images | grep "^<none>" | awk "{print $3}") |