Regal Fritillary at Indiantown Gap

Posted by & filed under Photography, Travelog.

Fort Indiantown Gap is an active military base, but in the middle of the base is a special habitat for a special butterfly. Regal Fritillary (Speyeria idalia) has been threatened by declining habitat area for the last fifty years. The military site offers them protection, and is the only remaining habitat for this butterfly left… Read more »

AWS Signature v4 in Bash

Posted by & filed under Programming.

The last step in signing the API request to AWS is calculating the signature using the secret key. Here is a subroutine to calculate it in a bash script. Make sure openssl is at least 1.0.0 function sign {   kSecret=$(printf “AWS4$1” | xxd -p -c 256)   kDate=$(printf “$2” | openssl dgst -binary -sha256 -mac HMAC… Read more »