Skip to content

Instantly share code, notes, and snippets.

@jliu70
jliu70 / main.go
Created January 7, 2018 18:19 — 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"
@jliu70
jliu70 / main.go
Created January 7, 2018 18:19 — forked from creack/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"os/signal"
"strconv"
@jliu70
jliu70 / https.go
Created January 7, 2018 18:18 — forked from kennwhite/https.go
Simple https http/2 static web server with HSTS & CSP (A+ SSLLabs & securityheaders.io rating) in Go using LetsEncrypt acme autocert
package main
import (
"crypto/tls"
"golang.org/x/crypto/acme/autocert"
"log"
"net"
"net/http"
)
@jliu70
jliu70 / dockerhub_remote_tags.sh
Created May 23, 2017 00:56
List Dockerhub remote tags
#!/bin/bash
if [ $# -lt 1 ];
then
echo "Usage:"
echo " $0 (image1) [image2] [image3]"
exit 1
fi
for i in "$@"
@jliu70
jliu70 / docker-networks.sh
Created May 23, 2017 00:56
List docker network details
#!/bin/bash
JQYES=""
while getopts ":jh" opt; do
case $opt in
j)
JQYES=1;;
h)
echo