Skip to content

Instantly share code, notes, and snippets.

View enconti's full-sized avatar

Emerson Contiero enconti

View GitHub Profile
@enconti
enconti / verify-lets-encrypt.sh
Created September 24, 2021 18:14 — forked from renato-zannon/README.md
Verify if host will have Let's encrypt certificate validation problems
#!/bin/bash
set -euo pipefail
CERTS_DIR="$(openssl version -d | sed -E 's/OPENSSLDIR: "([^"]*)"/\1/')"
exec {ALL_CERTS_FD}< <(
(
[[ -r "${CERTS_DIR}/cert.pem" ]] && echo "${CERTS_DIR}/cert.pem"
[[ -d "${CERTS_DIR}/certs" ]] && find -L "${CERTS_DIR}/certs" -type f -name '*.pem'
@enconti
enconti / go_file_print.go
Created July 7, 2021 18:22 — forked from limboinf/go_file_print.go
golang print file content
//打印文件内容
package main
import (
"bufio"
"bytes"
"fmt"
"os"
"io"
"path/filepath"