Skip to content

Instantly share code, notes, and snippets.

View hackerzhut's full-sized avatar

Sara hackerzhut

View GitHub Profile
package main
import (
"crypto/tls"
"fmt"
"net"
"os"
"bytes"
"io"
)
type T struct {
A int
B string
}
t := T{23, "skidoo"}
s := reflect.ValueOf(&t).Elem()
typeOfT := s.Type()
for i := 0; i < s.NumField(); i++ {
@hackerzhut
hackerzhut / b62.go
Created May 11, 2019 10:08 — forked from 607011/b62.go
Performance comparison of various base62 encoder techniques in Go
package main
import (
"fmt"
"math"
"reflect"
"runtime"
"sort"
"time"
)
@hackerzhut
hackerzhut / README.txt
Created May 16, 2019 03:31 — forked from ncw/README.txt
Client side certificates with go
This demonstrates how to make client side certificates with go
First generate the certificates with
./makecert.sh test@test.com
Run the server in one terminal
go run server.go
@hackerzhut
hackerzhut / main.workflow
Created September 9, 2019 01:06 — forked from pahud/main.workflow
Github Actions with Amazon EKS CI/CD
workflow "Demo workflow" {
on = "push"
resolves = ["SNS Notification"]
}
action "Build Image" {
uses = "actions/docker/cli@c08a5fc9e0286844156fefff2c141072048141f6"
runs = ["/bin/sh", "-c", "docker build -t $IMAGE_URI ."]
env = {
IMAGE_URI = "xxxxxxxx.dkr.ecr.ap-northeast-1.amazonaws.com/github-action-demo:latest"
@hackerzhut
hackerzhut / golang-tls.md
Created October 22, 2019 12:32 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@hackerzhut
hackerzhut / pod-baseline.yaml
Created February 3, 2024 14:23 — forked from liggitt/pod-baseline.yaml
pod security proof-of-concept
kind: Pod
apiVersion: v1
metadata:
name: baseline-pod
spec:
containers:
- name: default
image: k8s.gcr.io/pause:3.2