Extracts perms from cloud-custodian repo, sanitizes extracted data, and transforms into terraform.
The code will
- search for
permissions = (get this data)
over multiline - print only the captured group
policies: | |
################################################### | |
### First Tag the Creator of the IAM User ##### | |
################################################### | |
- name: iam-auto-tag-user | |
resource: iam-user | |
mode: | |
packages: [boto3, botocore, urllib3] |
# Gawk version | |
# Remote | |
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($3,index($3,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($3,i,2))}{print x":"strtonum("0x"substr($3,index($3,":")+1,4))}' | |
# Local | |
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($2,index($2,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($2,i,2))}{print x":"strtonum("0x"substr($2,index($2,":")+1,4))}' | |
# No Gawk | |
# Local | |
grep -v "rem_address" /proc/net/tcp | awk 'function hextodec(str,ret,n,i,k,c){ |
I'm in no case responsible for fried hardware, erased software or burning down houses. Make sure your miners are always well cooled.
Though you can easily mix nVidia and AMD in the same rig with Linux, it's recommended to use a different thread for each platform so a Driver crash doesn't bring the whole rig down. It should be noted however, that some mining software have trouble when both architecture are found on the same rig.
Thank you everybody, Your comments makes it better
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
image: docker:latest | |
before_script: | |
- apt-get update -y # Updating the Ubuntu Docker instance. | |
- python -V # Print out python version for debugging. | |
- apt install -y zip jq | |
- pip install awscli --upgrade --user | |
- export PATH=~/.local/bin:$PATH # Required for awscli. | |
- aws --version # Print out aws cli version for debugging. |