If you'd like to experiment with Terraform on macOS locally, a great provider for doing so is the Docker provider. You can get set up in a few simple steps, like so:
Install Docker for Mac if you have not already.
| #!/usr/bin/env bash | |
| set -e | |
| # Formats any *.tf files according to the hashicorp convention | |
| files=$(git diff --cached --name-only) | |
| for f in $files | |
| do | |
| if [ -e "$f" ] && [[ $f == *.tf ]]; then | |
| #terraform validate `dirname $f` | |
| terraform fmt $f | 
| t = [1,1,2,2,3] | |
| f = fn(n) -> | |
| IO.puts("starting #{n}") | |
| :timer.sleep(n * 1000) | |
| IO.puts("finishing #{n}") | |
| n | |
| end | |
| tasks = Enum.map(t, fn(n) -> | 
If you'd like to experiment with Terraform on macOS locally, a great provider for doing so is the Docker provider. You can get set up in a few simple steps, like so:
Install Docker for Mac if you have not already.
| #cloud-config | |
| package_upgrade: true | |
| packages: | |
| - docker | |
| - python2-pip | |
| write_files: | |
| - path: /etc/systemd/system/docker.service.d/aws-credentials.conf | |
| content: | | |
| [Service] | |
| Environment="AWS_ACCESS_KEY_ID=<key>" | 
Here I wanted to share my own configuration of Visual Studio Code that I currently use when programming in Elixir. The section about Tasks and Shortcut is taken from this post: Running Elixir Tests in Visual Studio Code/ElixirLS.
| # Makefile for PlantUML | |
| # Author: Devin Weaver (@sukima) <[email protected]> | |
| # GistID: 52eacde54bf7861b19ee66a07b864583 | |
| # | |
| # This handles SVGs PNGs and ASCII outputs. | |
| # It handles included files with the .iuml extension: !include foo.iuml | |
| # All diagrams have the .uml extension and reside in the diagrams directory | |
| # All output is saved to the output directory | |
| # | |
| # make svg - (default) build all diagrams as SVGs | 
| sudo yum update | |
| sudo amazon-linux-extras enable postgresql11 | |
| sudo yum install postgresql postgresql-devel | 
| psql -h <host> -U <user> -W -d postgres | |
| SELECT * from pg_stat_activity; | |
| SELECT * from pg_stat_database; | |
| # Queries running during >5 minutes | |
| SELECT | |
| pid, | |
| datname, | |
| query, |