(Disclaimer: work in progress!)
Consistent usage of count
Place count consistently in modules. count dramatically changes how a client will reason about a resource, so make it very clear what resources are dynamic.
| // finally - got from | |
| // https://community.miro.com/ideas/project-links-and-sharing-1180/index2.html?postid=6066#post6066 | |
| // Run the below in the developer tools when the project dashboard is open. | |
| dashboardData = JSON.parse(localStorage["rtb_saved_dashboard"]).tree.dashboard; | |
| "https://miro.com/app/dashboard/?spaceId="+dashboardData.currentSpaceId+"&projectId="+dashboardData.currentProject.id; |
(Disclaimer: work in progress!)
Consistent usage of count
Place count consistently in modules. count dramatically changes how a client will reason about a resource, so make it very clear what resources are dynamic.
| # This function pushes the current branch to 'origin'. If a web address is shown | |
| # in the output, it opens it up. On GitHub, GitLab and BitBucket, this means it | |
| # will open the pull request for you! | |
| # | |
| # This is also part of the 'dotfiles' configration at: | |
| # github.com/effective-shell/dotfiles | |
| # Push the current branch to origin, set upstream, open the PR page if possible. | |
| # Inspired by: https://gist.github.com/tobiasbueschel/ba385f25432c6b75f63f31eb2edf77b5 | |
| # How to get the current branch: https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch |
| // Example showing how to patch Kubernetes resources. | |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "k8s.io/apimachinery/pkg/runtime/schema" | |
| types "k8s.io/apimachinery/pkg/types" | |
| "k8s.io/client-go/dynamic" |
| // Example showing how to patch Kubernetes resources. | |
| package main | |
| import ( | |
| "fmt" | |
| metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | |
| "k8s.io/apimachinery/pkg/runtime/schema" | |
| "k8s.io/client-go/dynamic" | |
| _ "k8s.io/client-go/plugin/pkg/client/auth" |
| // Example showing how to patch kubernetes resources. | |
| // This is the companion to my article 'Patching Kubernetes Resources in Golang': | |
| // https://dwmkerr.com/patching-kubernetes-resources-in-golang/ | |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| types "k8s.io/apimachinery/pkg/types" |
| // Gist: https://gist.github.com/dwmkerr/58bfbf55eb9f05c8603958806add00cc | |
| // Source: https://aws.amazon.com/about-aws/global-infrastructure/ | |
| // Updated: 2018-02-27 | |
| // Examples: | |
| // 1. Get the second az in singapore: | |
| // "${element(var.aws_availability_zones['ap-southeast-1'], 0)}" | |
| // Availability zones for each region |
Easy to remember, easy to forget.
It's nice to be able to run subl in a terminal.