Skip to content

Instantly share code, notes, and snippets.

View chenxinlong's full-sized avatar

triangle chenxinlong

  • Xiamen, China
  • 10:21 (UTC +08:00)
View GitHub Profile
@chenxinlong
chenxinlong / .gitconfig
Created May 23, 2018 13:57 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = [email protected]
username = pksunkara
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
// 安装客户端
apt install -y shadowsocks
// 代理服务器配置, 16.04 tls 上 apt 安装的 ss 客户端仅支持部分加密 method, 比如 aes-256-cfb
// 建一个配置文件,比如 shadowsocks.json ,写入:
{
"server":"代理服务器的ip",
"server_port":10763,
"local_address":"127.0.0.1",
"local_port":1080,
编辑 curl 的配置文件 ~/.curlrc
// http 代理
proxy=http://username:password@host:port
// socks5 代理
proxy=socks5://127.0.0.1:1080
@chenxinlong
chenxinlong / go-os-arch.md
Created June 9, 2018 06:40 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.8.3 darwin/amd64.

A list of valid GOOS values

(Bold = supported by go out of the box, ie. without the help of a C compiler, etc.)

  • android
  • darwin
@chenxinlong
chenxinlong / curlopt_codes.txt
Created September 26, 2018 03:24 — forked from jseidl/curlopt_codes.txt
CURLOPT codes
CURLOPT_NOTHING = 0;
CURLOPT_FILE = 10001;
CURLOPT_URL = 10002;
CURLOPT_PORT = 3;
CURLOPT_PROXY = 10004;
CURLOPT_USERPWD = 10005;
CURLOPT_PROXYUSERPWD = 10006;
CURLOPT_RANGE = 10007;
CURLOPT_INFILE = 10009;
CURLOPT_ERRORBUFFER = 10010;
@chenxinlong
chenxinlong / openresty & ngx_brotli
Last active August 16, 2020 13:19
openresty 中用 brotli 代替 gzip 压缩静态资源
### 下载 && 编译 libbrotli
git clone https://github.com/bagder/libbrotli
cd libbrotli
./autogen.sh
./configure
make && make install
### ./autogen.sh 在更新 submodule 时出现 error: RPC failed; result=18, HTTP code = 200B 错误,可以执行以下命令然后重新 ./autogen.sh
### 参考:https://stackoverflow.com/questions/17683295/git-bash-error-rpc-failed-result-18-htp-code-200b-1kib-s
git gc --aggressive
<?php
function getDateListByRange() {
$dateRange = new \DatePeriod(
new \DateTime(date('Y-m-d', strtotime($start))),
new \DateInterval('P1D'),
(new \DateTime(date('Y-m-d',strtotime($end))))->modify('+1 day')
);
$tables = [];

Keybase proof

I hereby claim:

  • I am chenxinlong on github.
  • I am cinlen (https://keybase.io/cinlen) on keybase.
  • I have a public key ASCMFNpYNEzM6QlzD-P9_HyDYpsM5jpKfoKAbSZMIfM7Wwo

To claim this, I am signing this object:

@chenxinlong
chenxinlong / git
Last active December 2, 2022 02:44
git
We couldn’t find that file to show.
#!/usr/bin/env php
<?php
if (count($argv) == 1) {
throw new InvalidArgumentException('Missing tables');
}
$tables = array_slice($argv, 1);
$db = new PDO('mysql:dbname=uniqueway_development;host=127.0.0.1;charset=utf8mb4', 'root', '');