prepare repository
[p1]$ go run main.go -init --work-dir repo
flowchart TD
Root --> Snapshot
Root --> Timestamp
prepare repository
[p1]$ go run main.go -init --work-dir repo
flowchart TD
Root --> Snapshot
Root --> Timestamp
server.go
package main
import (
"fmt"
"log"
"net"
"time"
package main | |
import ( | |
"context" | |
"crypto/tls" | |
"crypto/x509" | |
"flag" | |
"fmt" | |
"log" | |
"os" |
$ helm repo add hashicorp https://helm.releases.hashicorp.com
$ helm install vault hashicorp/vault
(require 'org) | |
(setq-default indent-tabs-mode nil) | |
(setq org-display-inline-images t) | |
(setq org-redisplay-inline-images t) | |
(setq org-startup-with-inline-images "inlineimages") | |
(setq default-frame-alist | |
(append (list '(width . 72) '(height . 40)))) |
apiVersion: networking.k8s.io/v1 | |
kind: NetworkPolicy | |
metadata: | |
name: test-policy | |
namespace: default | |
spec: | |
# ポリシを適用するPodをselectorで指定 | |
podSelector: | |
# IngressとEgressを両方またはいずれか指定 | |
policyTypes: |
#!/bin/bash | |
a=( | |
'sudo echo ${foo}' | |
'sudo ls -l' | |
'ls -l | sudo echo ${foo}' | |
) | |
foo="hello" |
apiVersion: v1 | |
kind: ReplicationController | |
metadata: | |
name: nginx | |
spec: | |
replicas: 3 | |
selector: | |
app: nginx | |
template: | |
metadata: |
func main() { | |
r := mux.NewRouter() | |
r.HandleFunc("/foo", someHandler) | |
var err error | |
listener, err := net.Listen("unix", "/var/run/fcgi.sock") | |
if err != nil { | |
log.Fatal(err) | |
} |
package cmd | |
import ( | |
"bytes" | |
"testing" | |
) | |
func TestCmd(t *testing.T) { | |
buf := bytes.NewBuffer([]byte{}) | |
errBuf := bytes.NewBuffer([]byte{}) |