Check These Out
Whenever we are only interested in difference between two numbers and not the positive/negative values we can use this in script.
Tired of front end developers using short open tags in your views? This will replace all instances of
You might want to secure your AWS operations requiring to use a MFA token. But then to use API or tools, you need to pass credentials generated with a MFA token.
This commands asks you for the MFA code and retrieves these credentials using AWS Cli. To print the exports, you can use:
`awk '{ print "export AWS_ACCESS_KEY_ID=\"" $1 "\"\n" "export AWS_SECRET_ACCESS_KEY=\"" $2 "\"\n" "export AWS_SESSION_TOKEN=\"" $3 "\"" }'`
You must adapt the command line to include:
* $MFA_IDis ARN of the virtual MFA or serial number of the physical one
* TTL for the credentials
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
This command will display all lines between 2 patterns: word-a and word-b
useful for grepping command outputs from file
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
Scrap everything and use `gawk` to do all the magic, since it's like the future or something.
$ gawk 'match($11, /[a-z]{3}$/) && match($9, /^ata-/) { gsub("../", ""); print $11,"\t",$9 }'
Yank out only ata- lines that have a drive letter (ignore lines with partitions). Then strip ../../ and print the output.
Yay awk. Be sure to see the alternatives as my initial command is listed there. This one is a revision of the original.
Use ImageMagick to create a "black and white" copy of an image.
You might want to secure your AWS operations requiring to use a MFA token. But then to use API or tools, you need to pass credentials generated with a MFA token.
This commands asks you for the MFA code and retrieves these credentials using AWS Cli. To print the exports, you can use:
`awk '{ print "export AWS_ACCESS_KEY_ID=\"" $1 "\"\n" "export AWS_SECRET_ACCESS_KEY=\"" $2 "\"\n" "export AWS_SESSION_TOKEN=\"" $3 "\"" }'`
You must adapt the command line to include:
* $MFA_IDis ARN of the virtual MFA or serial number of the physical one
* TTL for the credentials