This file contains 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 | |
# | |
# kubectl-otk-ssh | |
# | |
# this script provides a way to SSH/SSM into hosts. this is backed | |
# by AWS SSM and is not a true ssh. this scripts provides the functionality | |
# to select random hosts by status or labels or directly choose a host. | |
# | |
# Install: | |
# |
This file contains 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
# this will find all resources listed under a module and then parse | |
# the output to xargs and taint each resource that lives under the module | |
terraform state list module.eks | xargs -d '\n' -n1 terraform taint |
This file contains 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
terraform { | |
required_providers { | |
digitalocean = { | |
source = "digitalocean/digitalocean" | |
} | |
} | |
} | |
provider "digitalocean" { | |
} |
This file contains 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 | |
REPO="actions/runner" | |
curl -s "https://api.github.com/repos/${REPO}/releases/latest" \ | |
| jq -r .tag_name \ | |
| cut -d'v' -f2 |
This file contains 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 ( | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"github.com/gorilla/mux" | |
"github.com/lafikl/consistent" |
This file contains 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 ( | |
"log" | |
) | |
func main() { | |
// turn tasks into a channel | |
tasks := generator( | |
Task{Name: "one"}, |
This file contains 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 ( | |
"fmt" | |
"sync" | |
) | |
func main() { | |
ids := generator("id1", "id2", "id3", "id4", "id5", "id6") |
This file contains 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 | |
func main() { | |
r := mux.NewRouter() | |
mount(r, "/api/v1", handler.Router(), auth) | |
... | |
} | |
// mount will take routers from a handler and add it with a pathprefix | |
// mount will take routers from a handler and add it with a pathprefix |
This file contains 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 ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"os/signal" | |
"sync" |
This file contains 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
[Unit] | |
Description=VSCode server for internal network and vpn | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
TimeoutStartSec=0 | |
Restart=always | |
ExecStartPre=-/usr/bin/docker stop vscode | |
ExecStartPre=-/usr/bin/docker rm vscode |
NewerOlder