This file contains 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
#!/usr/bin/env bash | |
self=$(basename $0) | |
[ "$1" = "help" ] && [ ! -f "$1" ] \ | |
&& echo -e "scr_to_gif: v1.0" \ | |
&& echo -e "usage: ${self} <filename.mov> <scale> <speed>\n" \ | |
&& echo -e "scale: - Range 100-9999" \ | |
&& echo -e " - A single number to denote the desired width, the height will be automatic. E.g: 300, 500, 640, 800, 1024, 1280, 1600" \ | |
&& echo -e " - Also both dimensions with numbers within range. Separated by a colon. Example: 100:100, 512,512, 800:600" \ |
This file contains 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
#!/usr/bin/env bash | |
# usage: chris-terraform ... (any terraform command you want) | |
role=XYZ | |
credentials=(`aws sts assume-role --role-arn "${role}" --role-session-name terraform --query '[Credentials.AccessKeyId,Credentials.SecretAccessKey,Credentials.SessionToken]' --output text`) | |
AWS_ACCESS_KEY_ID=${credentials[0]} | |
AWS_SECRET_ACCESS_KEY=${credentials[1]} | |
AWS_SESSION_TOKEN=${credentials[2]} | |
AWS_SECURITY_TOKEN=${credentials[2]} |
This file contains 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
variable "stage_name" { | |
value = "default" | |
} | |
resource "aws_api_gateway_domain_name" "main" { | |
domain_name = "whatever.domain.com" | |
regional_certificate_arn = "arn:aws:acm:us-west-2:accountID:certificate/certID" | |
endpoint_configuration { | |
types = ["REGIONAL"] |
This file contains 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
class InputField extends React.Component<InputFieldProps, any> | |
{ | |
componentDidMount() | |
{ | |
// Manually trigger validation rules to test whether the values set are ok or not | |
this.props.onChange({ | |
target:{ | |
value:this.props.value | |
} | |
}); |