Skip to content

Instantly share code, notes, and snippets.

View gvasquez95's full-sized avatar
😉

Gonzalo Vasquez gvasquez95

😉
  • Amazon Web Services
  • Santiago, Chile
View GitHub Profile
@codspire
codspire / getting-started-with-superset-airbnb-data-exploration-platform.md
Last active February 12, 2024 21:41
Getting Started With Superset: Airbnb’s data exploration platform

Getting Started With Superset: Airbnb’s data exploration platform

Update Python and PIP versions on EC2 (Amazon AMI)

At the time of writing, Python v3.5 and PIP v9.0.1 were available on AWS EC2.

sudo yum update -y
sudo yum install python35 -y
@lukeplausin
lukeplausin / bash_aws_jq_cheatsheet.sh
Last active January 29, 2024 10:00
AWS, JQ and bash command cheat sheet. How to query, cut and munge things in JSON generally.
# Count total EBS based storage in AWS
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add"
# Count total EBS storage with a tag filter
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add"
# Describe instances concisely
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]'
# Wait until $instance_id is running and then immediately stop it again
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id
# Get 10th instance in the account