This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This module creates an HTTPS web server and serves static content | |
from a specified directory on a specified port. | |
To generate a new cert: | |
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 | |
To remove the passphrase requirement: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/*************************************************************************** | |
* | |
* Copyright (c) 2011 log4myself.com, Inc. All Rights Reserved | |
* | |
**************************************************************************/ | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* PHP 简易socks5客户端。支持密码方式验证 | |
*/ | |
$user = 'root'; | |
$pass = '123456'; | |
$port = 80; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* nginx日志文件分析。 | |
* 根据配置的nginx日志格式,分析对应的日志内容。各变量 | |
*/ | |
class NginxLog { | |
protected static $br = "\n"; | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//消除文件中的注释内容。支持以下两种格式 | |
//1. 以//开头单行注释 | |
//2. /**/块级注释 | |
//可用于清除配置文件中的注释 | |
package comment | |
func ClearLine(text []byte) []byte { | |
newText := []byte("") | |
n := byte('\n') | |
r := byte('\r') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2012 Junqing Tan <[email protected]> and The Go Authors | |
// Use of this source code is governed by a BSD-style | |
// Part of source code is from Go fcgi package | |
// Fix bug: Can't recive more than 1 record untill FCGI_END_REQUEST 2012-09-15 | |
// By: wofeiwo | |
package fcgiclient | |
import ( |