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 ec2 describe-instances \ | |
| --filter Name=tag-key,Values=Name \ | |
| --query 'Reservations[*].Instances[*].{Instance:InstanceId,AZ:Placement.AvailabilityZone,Name:Tags[?Key==`Name`]|[0].Value,DNS_Pub:PublicDnsName, DNS_Pri:PrivateDnsName}' \ | |
| --output table \ | |
| $@ |
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
| #!/bin/bash | |
| $PROFILE_NAME="user-has-assume-role" | |
| $ROLE_ARN="role-arn-that-has-policies-to-work" | |
| $SESSION_NAME="session-name-to-identify" | |
| export AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id --profile $PROFILE_NAME) | |
| export AWS_SECRET_ACCESS_KEY=$(aws configure get aws_secret_access_key --profile $PROFILE_NAME) | |
| unset AWS_SESSION_TOKEN |
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
| #!/bin/bash | |
| # Reset to initial commit | |
| git log --format=%H origin/master | tail -1 | xargs git reset --hard | |
| # checkout one by one | |
| git log --format=%H HEAD..origin/master | tail -1 | xargs git checkout |
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
| [alias] | |
| lg = log --oneline --graph -10 | |
| lgm = log --oneline --graph master..HEAD | |
| lgn = log --name-only -1 | |
| st = status | |
| pf = push --force | |
| bd = branch -D | |
| bdr = push origin --delete | |
| bl = branch --list | |
| blr = branch --list --remote |