Skip to content

Instantly share code, notes, and snippets.

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

Leon Guan pzgz

🏠
Working from home
View GitHub Profile
@pzgz
pzgz / compose-caddy.yml
Created September 20, 2021 06:38 — forked from pascalandy/compose-caddy.yml
Traefik V2 / my docker compose files
version: "3.3"
services:
caddy:
image: abiosoft/caddy:1.0.3-no-stats
container_name: caddy
hostname: caddy
restart: unless-stopped
volumes:
!function() {
var e, t = function() {}
, o = ["assert", "clear", "count", "debug", "dir", "dirxml", "error", "exception", "group", "groupCollapsed", "groupEnd", "info", "log", "markTimeline", "profile", "profileEnd", "table", "time", "timeEnd", "timeStamp", "trace", "warn"], n = o.length;
0 == /mmdebug/.test(location.search) && location.href.indexOf("dev.web.weixin") < 0 && (window.console = {});
for (var r = window.console = window.console || {}; n--; )
e = o[n],
r[e] || (r[e] = t)
}
(),
angular.module("Controllers", []),
@pzgz
pzgz / cert-client.sh
Last active August 29, 2015 14:10 — forked from bao3/cert-client.sh
#! /bin/sh
#! /usr/bin/expect -f
certtool --generate-privkey --outfile $1-key.pem
sed -i "1ccn = "${1}"" client.tmpl
sed -i "3cemail = ${1}@abc.org" client.tmpl
certtool --generate-certificate --load-privkey $1-key.pem --load-ca-certificate ca-cert.pem --load-ca-privkey ca-key.pem --template client.tmpl --outfile $1-cert.pem
openssl pkcs12 -export -inkey $1-key.pem -in $1-cert.pem -name "$1 VPN Client Cert" -certfile ca-cert.pem -out $1.cert.p12
@pzgz
pzgz / syntax_highlighting.py
Created January 2, 2012 19:16 — forked from JeanMertz/syntax_highlighting.py
Ruby on Rails syntax highlight switcher for Sublime Text 2
import sublime, sublime_plugin
import os
class DetectFileTypeCommand(sublime_plugin.EventListener):
""" Detects current file type if the file's extension isn't conclusive """
""" Modified for Ruby on Rails and Sublime Text 2 """
""" Original pastie here: http://pastie.org/private/kz8gtts0cjcvkec0d4quqa """
def on_load(self, view):
filename = view.file_name()