- C-a == Ctrl-a
- M-a == Alt-a
:q close
:w write/saves
:wa[!] write/save all windows [force]
:wq write/save and close
| <?php declare(strict_types=1); | |
| if ( | |
| extension_loaded( 'xdebug' ) | |
| && version_compare( '2.6.0', phpversion( 'xdebug' ), '<=' ) | |
| ) | |
| { | |
| /** @noinspection PhpUndefinedFunctionInspection */ | |
| /** @noinspection PhpUndefinedConstantInspection */ | |
| xdebug_set_filter( |
| #!/usr/local/bin/python3 | |
| from kubernetes import client, config | |
| import sys | |
| config.load_kube_config() | |
| def print_help(): | |
| print('I need the namespace(s) as an argument') | |
| if len(sys.argv) <= 1: |
| # Terraform | |
| alias trf='terraform' | |
| ## Terragrunt | |
| alias trg='terragrunt' | |
| alias trgfmt='terragrunt hclfmt' | |
| alias trglint='find . -type f -not -path "*/\.*" | grep ".hcl" | terragrunt hclfmt' | |
| alias trgcleancache='find . -type d -name ".terragrunt-cache" -prune -exec rm -rf {} \;' | |
| function trginitall() { |
| # Terraform Cost Estimation + Open Policy Agent | |
| # | |
| # This code snippet supports terraform state for now. | |
| # | |
| # Get the whole response: | |
| # opa eval --data terraform-cost-estimation.rego --input terraform.tfstate --format pretty data.terraform_cost_estimation | |
| # | |
| # Get boolean response. Return false if state (per hour) is too expensive: | |
| # opa eval --data terraform-cost-estimation.rego --input terraform.tfstate --format pretty data.terraform_cost_estimation.response.allowed |