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 / sublimetext3_configuration.json
Created October 26, 2015 07:33
My sublime text 3 configuration
{
"Seti_tabs_small": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"detect_slow_plugins": false,
"draw_minimap_border": true,
"file_exclude_patterns":
[
"*.pyc",
"*.pyo",
@pzgz
pzgz / ocserv.route.conf
Last active January 13, 2016 04:46
OpenConnect Routes Configuration,参考http://www.v2ex.com/t/136431,修改精简到200条
# Amazon
route = 8.18.144.0/255.255.254.0
route = 23.20.0.0/255.252.0.0
route = 27.0.0.0/255.255.252.0
route = 46.51.0.0/255.255.0.0
route = 46.137.0.0/255.255.0.0
route = 50.16.0.0/255.252.0.0
route = 50.112.0.0/255.255.0.0
route = 54.0.0.0/255.0.0.0
@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 / ocserv.sh
Last active April 27, 2021 11:35
OpenConnect VPN Server Configuration Files on Linode Ubuntu
#!/bin/sh
### BEGIN INIT INFO
# Provides: ocserv
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
# Copyright Rene Mayrhofer, Gibraltar, 1999
# This script is distibuted under the GPL
@pzgz
pzgz / gfwlist_custom.txt
Last active April 14, 2016 15:17
GFW List Custom List
||googlehosted.com
||tapity.com
||cocoapods.org
||fbcdn.net
||91porn.com
||api.login.yahoo.com
||ruby-toolbox.com
||ssl.gstatic.com
||coderwall.com
||sourceforge.net
@pzgz
pzgz / gmetad.conf
Created July 8, 2014 06:37
Ganlia Sample Configuration
# This is an example of a Ganglia Meta Daemon configuration file
# http://ganglia.sourceforge.net/
#
# $Id: gmetad.conf 667 2006-07-20 08:49:41Z knobi1 $
#
#-------------------------------------------------------------------------------
# Setting the debug_level to 1 will keep daemon in the forground and
# show only error messages. Setting this value higher than 1 will make
# gmetad output debugging information and stay in the foreground.
# default: 0
@pzgz
pzgz / brew --config
Created June 11, 2014 06:01
Brew Doctor Error about zLib Import
~  brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: 25cffcf1e4fa8b2bc8f989d33d8946978a2da9d4
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit ivybridge
OS X: 10.9.4-x86_64
Xcode: 5.1.1
CLT: 5.1.0.0.1.1396320587
@pzgz
pzgz / update.sh
Created December 30, 2012 09:28
GraceMode autoddvpn update script for tomato firmware
#!/bin/sh
#set -x
host='autoddvpn.googlecode.com'
cv_dir='/jffs/var/'
cv_file="${cv_dir}version.client"
vpnup_remote_path='http://autoddvpn.googlecode.com/svn/trunk/grace.d/vpnup.sh'
vpndown_remote_path='http://autoddvpn.googlecode.com/svn/trunk/grace.d/vpndown.sh'
vpnup_local_path='/jffs/openvpn/vpnup.sh'
vpndown_local_path='/jffs/openvpn/vpndown.sh'