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
| vault_session() { | |
| date_now=$(date -u "+%s") | |
| if [[ $(uname) == "Darwin" ]] | |
| then | |
| date_expiration=$(date -u -j -f "%FT%R:%SZ" $AWS_SESSION_EXPIRATION "+%s"); | |
| else | |
| date_expiration=$(date -d $AWS_SESSION_EXPIRATION "+%s"); | |
| fi; | |
| if [[ $date_expiration < $(date -u "+%s") ]] | |
| then |
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
| typedef int SOCKET; | |
| typedef struct sockaddr_in SOCKADDR_IN | |
| typedef struc sockaddr SOCKADDR; | |
| typedef stuct in_addr IN_ADDR; | |
| ----------------------------------------------------------------------------- | |
| SOCKET sock; | |
| sock = socket(AF_INET, SOCK_STREAM, 0); | |
| SOCKADDR_IN addr = {0}; |