This file contains hidden or 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
| package main | |
| import ( | |
| "errors" | |
| "fmt" | |
| ) | |
| // Node represents a node in the DAG. | |
| type Node struct { | |
| ID int |
This file contains hidden or 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
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "io" | |
| "log" | |
| "path/filepath" | |
| "sync" |
This file contains hidden or 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
| apiVersion: v1 | |
| kind: Pod | |
| metadata: | |
| name: myapp | |
| labels: | |
| name: myapp | |
| spec: | |
| containers: | |
| - name: myapp | |
| image: &elasticsearch_image docker.io/bitnami/elasticsearch:8.3.3-debian-11-r5 |
This file contains hidden or 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
| BUCKET=foo-bucket | |
| [email protected] | |
| gsutil iam get gs://$BUCKET | | |
| jq -r '.bindings | | |
| map(select(any( | |
| .members[]; contains("user:'$USER'"))) | |
| |.role)[]' |
This file contains hidden or 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 "project_id" { | |
| description = "The name of the Google Project ID where the keys will be stored. eg: 'my-project'" | |
| type = string | |
| } | |
| data "google_projects" "prj" { | |
| filter = "id:${var.project_id}" | |
| lifecycle { | |
| postcondition { | |
| condition = length(self.projects) == 1 |
This file contains hidden or 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/bash | |
| set -eEo pipefail | |
| set -x | |
| print_usage() { | |
| cat <<HELP_USAGE | |
| Usage: | |
| $0 [-p <project>] [-z <zone>] <vm_name> | |
| -p Project the VM belongs to |
This file contains hidden or 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
| branchclean () { | |
| for branch in $(git branch | grep -v master) | |
| do | |
| git branch -d $branch | |
| done | |
| } |
This file contains hidden or 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
| func advanceLetter(s string, n int) string { | |
| var x []rune | |
| // add a known rune to the slice in case we need to advance it | |
| x = append(x, rune(1337)) | |
| // Create a slice of runes | |
| for _, r := range s { | |
| x = append(x, r) | |
| } | |
| // Need to reverse index |
This file contains hidden or 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
| resource.type="k8s_cluster" | |
| protoPayload.methodName="io.k8s.core.v1.pods.exec.create" |
This file contains hidden or 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
| alias apt-get='apt-get \ | |
| -o Acquire::BrokenProxy="true" \ | |
| -o Acquire::http::No-Cache="true" \ | |
| -o Acquire::http::Pipeline-Depth="0" \ | |
| -o Acquire::CompressionTypes::Order::="gz"' |
NewerOlder