Skip to content

Instantly share code, notes, and snippets.

View hackerzhut's full-sized avatar

Sara hackerzhut

View GitHub Profile
@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
@hackerzhut
hackerzhut / golang-tls.md
Created October 22, 2019 12:32 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
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 / 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 / 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 [email protected]
Run the server in one terminal
go run server.go
@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"
)
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++ {
package main
import (
"crypto/tls"
"fmt"
"net"
"os"
"bytes"
"io"
)
@hackerzhut
hackerzhut / k8s-svc-annotations.md
Created March 4, 2019 07:32 — forked from mgoodness/k8s-svc-annotations.md
AWS ELB-related annotations for Kubernetes Services (as of v1.12.0)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
  • service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags (comma-separated list of key=value)
  • service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)
  • service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)
@hackerzhut
hackerzhut / Optimize_read_path.md
Created February 28, 2019 04:09 — forked from MakMukhi/Optimize_read_path.md
gRPC-Go: Optimize read path

gRPC-Go: Optimize read path

Status: (Final)

Authors: [email protected]

Reviewers: dfawley@, menghanl@, yuxuanli@, psrini@

Last Updated: 2018-02-25

@hackerzhut
hackerzhut / Dockerfile
Created March 28, 2018 04:53 — forked from profjsb/Dockerfile
Refreshing Materialized Views in Postgres using Docker
# Dockerfile to run the cron jobs in root, including python/psycopg2
FROM alpine:edge
RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing py-psycopg2
EXPOSE 6000
COPY refresh.py /refresh.py
COPY root /var/spool/cron/crontabs/root
CMD crond -l 2 -f