Skip to content

Instantly share code, notes, and snippets.

View up1's full-sized avatar

Somkiat Puisungnoen up1

View GitHub Profile
@up1
up1 / vault-init.sh
Created October 17, 2022 06:22 — forked from winggundamth/vault-init.sh
Vault Init Bash Shell to put in postStart for Vault Helm Chart to initial Vault HA Cluster on Kubernetes. This will upload root token and unseal key to MinIO or S3 compatibility storage.
#!/bin/sh
cd /home/vault
if [[ ! -f jq ]]
then
echo "Download jq command..."
wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -O jq
chmod +x jq
fi
@up1
up1 / commit-message-guidelines.md
Created January 13, 2022 17:29 — forked from robertpainsi/commit-message-guidelines.md
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@up1
up1 / git-understanding-qs.md
Created May 16, 2021 16:38 — forked from githubteacher/git-understanding-qs.md
Questions to check your understanding of some Git and GitHub concepts.

Beginner: Check for understanding

  1. (multiple answer) Git is:

    • a. A version control system
    • b. Centralized
    • c. Distributed
    • d. The same as GitHub
  2. (T/F) Git and GitHub are the same thing.

@up1
up1 / handlers.go
Created March 24, 2021 14:28 — forked from dstroot/handlers.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"io"
"net/http"
"sync/atomic"
)
func index() http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
@up1
up1 / main.go
Created March 24, 2021 14:28 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@up1
up1 / graceful.go
Created October 20, 2020 18:26 — forked from peterhellberg/graceful.go
*http.Server in Go 1.8 supports graceful shutdown. This is a small example.
package main
import (
"context"
"log"
"net/http"
"os"
"os/signal"
"time"
)
@up1
up1 / composing-software.md
Created March 15, 2020 13:14 — forked from Geoff-Ford/composing-software.md
Eric Elliott's Composing Software Series

Eric Elliott's "Composing Software" Series

A collection of links to the excellent "Composing Software" series of medium stories by Eric Elliott.

Edit: I see that each post in the series now has index, previous and next links. However, they don't follow a linear flow through all the articles with some pointing back to previous posts effectively locking you in a loop.

@up1
up1 / README.md
Created August 19, 2019 09:35 — forked from dtinth/README.md
Transcribing Thai YouTube video using Google Cloud

How to transcribe Thai speech in videos into text.

Requirements

@up1
up1 / w3c.conf
Created July 3, 2018 14:49 — forked from iCyLand/w3c.conf
W3C json log format for nginx
## this GeoIP dat file relate on centos environment please change to your OS path
geoip_country /usr/share/GeoIP/GeoIP-initial.dat;
map $request_uri $request_uri_path {
"~^(?P<path>[^?]*)(\?.*)?$" $path;
}
log_format w3cjson escape=json
'{'
'"Date":"$time_iso8601",'
@up1
up1 / docker_service_report.py
Created June 22, 2017 14:41 — forked from narate/docker_service_report.py
Show all running docker services details for usable Copy and Paste
import docker
import json
client = docker.from_env()
service_list = client.services.list()
print("Services")
print("--------")
def to_mounts_string(ml):