Skip to content

Instantly share code, notes, and snippets.

Happy Developing

Patrick Peng Sun lawipac

Happy Developing
View GitHub Profile
lawipac / FileServerWith404.go
Created August 7, 2021 10:11 — forked from lummie/FileServerWith404.go
A wrapper for GOs http.FileServer that allows a custom 404 handler to be assigned
View FileServerWith404.go
package middleware
import (
// FSHandler404 provides the function signature for passing to the FileServerWith404
lawipac / file-upload-multipart.go
Created April 2, 2021 14:10 — forked from andrewmilson/file-upload-multipart.go
Golang multipart/form-data File Upload
View file-upload-multipart.go
package main
import (
lawipac / push ssl to cpanel and restart nginx.php
Created April 28, 2019 01:58
Update Cpanel certificate from external server
View push ssl to cpanel and restart nginx.php
#put under /etc/letsencrypt/renewal-hooks/deploy
//read environment variables
//the shell variable $RENEWED_LINEAGE will point to the config live subdirectory
//(for example, "/etc/letsencrypt/live/") containing the new certs and
//keys; the shell variable $RENEWED_DOMAINS will contain a space-delimited list
//of renewed cert domains (for example, "").