References
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
bench: | |
go test -bench=. 2>&1 | tee bench.out |
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
# Respect extended word-boundaries | |
set bind-tty-special-chars off | |
Control-u: kill-whole-line | |
Control-w: backward-kill-word | |
# Enable Alt- <- -> for jumping by words | |
"\e[1;5D": backward-word | |
"\eOd": backward-word | |
"\e[1;5C": forward-word | |
"\eOc": forward-word |
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
// 1. Navigate to your Activity Log | |
// 2. Paste this into the JavaScript Console | |
function clickDelete() { | |
document.querySelectorAll('[aria-label="Move to Trash"]')[0].click() | |
} | |
function clickMenu() { | |
document.querySelectorAll('[role="menuitem"]')[2].click(); | |
setTimeout(clickDelete, 250); | |
} |
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
.PRECIOUS: output.json terraform.tfplan terraform.tfstate | |
output.json: terraform.tfstate | |
terraform output -no-color -json | tee $@ | |
plan: terraform.tfplan | |
terraform.tfplan: | |
terraform plan -out $@ |
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
#!/bin/zsh | |
# expects https://github.com/ahmetb/kubectl-aliases | |
# implements lots of https://kubernetes.io/docs/reference/kubectl/cheatsheet/ | |
alias kgpos='kgpo --sort-by=.metadata.creationTimestamp' | |
alias kgpoy='kgpo -o yaml' | |
### config view | |
alias kcv='k config' |
- SC1000 $ is not used specially and should therefore be escaped.
- SC1001 This
\o
will be a regular 'o' in this context. - SC1003 Want to escape a single quote? echo 'This is how it'\''s done'.
- SC1004 This backslash+linefeed is literal. Break outside single quotes if you just want to break the line.
- SC1007 Remove space after = if trying to assign a value (or for empty string, use var='' ... ).
- SC1008 This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.
- SC1009 The mentioned parser error was in ...
- SC1010 Use semicolo
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
### Test scenario for "can" | |
variable "word-length" { | |
validation { | |
# The condition here identifies if the integer if greater than 1 | |
condition = var.word-length > 1 | |
error_message = "The variable is not greater than 5. Word length has to be at a minimum > 1." | |
} | |
} |
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 "os" { | |
default = "linux" | |
validation { | |
# The condition here identifies if the variable contains the string "linxu" OR "windows". | |
condition = can(regex("linux|windows", var.os)) | |
error_message = "ERROR: Operating System must be Windows OR Linux." | |
} | |
} |
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
# Try example | |
data "http" "primary-server" { | |
url = "https://ip-ranges.amazonaws.com/ip-ranges.json" | |
# Optional request headers | |
request_headers = { | |
Accept = "application/json" | |
} | |
} |
NewerOlder