Skip to content

Instantly share code, notes, and snippets.

@yusufsyaifudin
yusufsyaifudin / docker-compose.yml
Created October 15, 2019 04:33 — forked from everpeace/docker-compose.yml
kafka cluster in docker-compose.
# WARNING: This docker-compose.yml is only for testing purpose.
# Parameters:
# - name: CONFLUENT_PLATFORM_VERSION
# default: 3.0.0
# reference: https://hub.docker.com/u/confluentinc/
# Ports:
# - description: Major ports are exposed to host computer
# - zookeeper: 2181
# kafka1: 9091
# kafka2: 9092
@yusufsyaifudin
yusufsyaifudin / web-servers.md
Created November 30, 2019 02:10 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@yusufsyaifudin
yusufsyaifudin / ca_and_cert_golang_demo.go
Created February 25, 2020 08:54 — forked from shaneutt/LICENSE
Golang: Demonstrate creating a CA Certificate, and Creating and Signing Certs with the CA
package main
import (
"bytes"
"crypto/rand"
"crypto/rsa"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
@yusufsyaifudin
yusufsyaifudin / parse_json.go
Created September 15, 2021 08:23 — forked from mjohnsullivan/parse_json.go
Parse JSON objects with arbitrary key names in Go using interfaces and type assertions
// Parsing arbitrary JSON using interfaces in Go
// Demonstrates how to parse JSON with abritrary key names
// See https://blog.golang.org/json-and-go for more info on generic JSON parsing
package main
import (
"encoding/json"
"fmt"
)