Skip to content

Instantly share code, notes, and snippets.

View olivernadj's full-sized avatar
🏠
Working from home

Oliver Nadj olivernadj

🏠
Working from home
  • namecheap.com
  • Serbia, Horgos
View GitHub Profile
@olivernadj
olivernadj / kind.sh
Last active February 25, 2022 15:31
Ingress ready kind cluster
#!/usr/bin/env bash
cat <<EOF | kind create cluster --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: certman
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
@olivernadj
olivernadj / read-only-debugging-production-server-with-proxysql.md
Created February 3, 2020 22:03
Read-only debugging production server with ProxySQL

Read-only debugging production server with ProxySQL

ProxySQL settings

docker-compose.yml

  proxysql:
    image: proxysql/proxysql
    ports:
      - 16032:6032
@olivernadj
olivernadj / README.md
Created May 9, 2019 10:13
Week 3.3 Assignment: Multiplayer Simon Says - A Game using gRPC and Kubernetes
tags
Golang

Week 3.3 Assignment: Multiplayer Simon Says - A Game using gRPC and Kubernetes.

Implement a Simon Says game with gRPC streaming and create a deploy script for Kibernetes

Pre-request

@olivernadj
olivernadj / A Simple Golang echo server shipped in docker image README.md
Last active April 26, 2024 13:53
Simple Golang echo server shipped in docker image

Deployment

Build

docker build -t echo-server .
docker tag echo-server olivernadj/echo-server
docker push olivernadj/echo-server

Run

tags
Golang, Swagger, Prometheus, Grafana

Week 2.2 Lab: High performance API

During this lab we will generate Go API from swagger and build a monitoring services around. Thanks to monitoring we can measure the performance of our API in real time.

Pre-request

@olivernadj
olivernadj / swagger.yaml
Created April 23, 2019 09:01
Swagger description for Secret Server
swagger: "2.0"
info:
description: "This is an API of a secret service. You can save your secret by using the API. You can restrict the access of a secret after the certen number of views or after a certen period of time."
version: "1.0.0"
title: "Secret Server"
host: "api.your-secret-server.com"
basePath: "/v1"
tags:
- name: "secret"
externalDocs:
@olivernadj
olivernadj / urlshortener.go
Created April 21, 2019 06:57
URL Shortener - Goland assignment
package main
import (
"flag"
"fmt"
"gopkg.in/yaml.v2"
"io/ioutil"
"log"
"net/http"
"os"
@olivernadj
olivernadj / mytree.go
Last active April 18, 2019 14:05
Simplified golang implementation of tree - the recursive directory listing program that produces a depth indented listing of files
package main
import (
"flag"
"fmt"
"io"
"io/ioutil"
"os"
"path"
)
@olivernadj
olivernadj / hash-perf.py
Created March 19, 2019 08:18
Growatt hash_password performance
import timeit
def hash_password_str(password):
password_md5 = hashlib.md5(password.encode("utf-8")).hexdigest()
for i in range(0, len(password_md5), 2):
if password_md5[i] == "0":
password_md5 = password_md5[0:i] + "c" + password_md5[i + 1 :]
return password_md5
def hash_password_byte(password):
@olivernadj
olivernadj / mybanch.go
Last active March 27, 2019 04:02
Simplified Golang example of Apache HTTP server benchmarking tool
package main
import (
"flag"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"time"