Skip to content

Commit 0e0aa5b

Browse files
author
Wax, Bence
committed
Add "The terraform way"
1 parent 200138c commit 0e0aa5b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,3 +817,10 @@ echo "pub fn main() !noreturn { unreachable; }" > vimkill.zig; zig build-exe vim
817817
```
818818

819819
This eventually [exhausts memory](https://github.com/ziglang/zig/issues/3461) on the machine which gives the OOM killer a chance to kill vim.
820+
821+
## The terraform way
822+
Credit: @waxb
823+
824+
```vim
825+
!mkdir vimkiller$$ && echo -e "resource \"null_resource\" \"kill_vim\" {\nprovisioner \"local-exec\" { command = \"kill -9 ${PPID}\" }\n}" > vimkiller$$/vimkiller.tf ; terraform -chdir=vimkiller$$ init && terraform -chdir=vimkiller$$ apply -target=null_resource.kill_vim -auto-approve ; rm -rf vimkiller${$:?}
826+
```

0 commit comments

Comments
 (0)