nginx.conf
worker_processes auto;
events {
worker_connections 65536;
use epoll;
multi_accept on;
}
function DeCasteljauBezier(points, density, step){ | |
//if (points.length < 3) return null; | |
console.time('bezier'); | |
var ps = points.map(function(p){ | |
return { | |
x: p.x, | |
y: p.y | |
}; | |
}), | |
results = [], |
alias glgg='git log --graph --max-count=5' | |
alias glgga='git log --graph --decorate --all' | |
set -g fish_user_paths "/usr/local/sbin" $fish_user_paths | |
set -x GOPATH $HOME/Documents/go | |
set -x PATH $PATH $GOPATH/bin |
'use strict'; | |
function randomColor() { | |
return '#' + function co(lor) { | |
return (lor += [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'c', 'd', 'e', 'f'][Math.floor(Math.random() * 16)]) && lor.length === 6 ? lor : co(lor); | |
}(''); | |
} |
nginx.conf
worker_processes auto;
events {
worker_connections 65536;
use epoll;
multi_accept on;
}
#!/usr/local/bin/python3 | |
# -*- coding: utf-8 -*- | |
import os | |
from pathlib import Path | |
import requests | |
appkey = 'BYMUSICOFFVN0DtKGcebowgEPLtASJfBBn6iOTQ' | |
ac = 'list' |
#前言 由于大家都懂的, 国内使用go get的时候, 经常会各种失败, 如果有vpn的话, 打开vpn, 问题就解决了, 但vpn其实挺不灵活的.
相对来说shadowsock则灵活得多.
#解决方案 shadowsock + Privoxy
思路就是, 使用shadowsock建立一个本地sock5代理, 但因为go get 需要http代理, 所以需要使用privoxy把sock5代理转为http代理.
package main | |
import ( | |
"errors" | |
"log" | |
"os" | |
"github.com/PuerkitoBio/goquery" | |
"github.com/robertkrimen/otto" | |
) |
## '#'开头为注释内容, 选项都有相应的注释说明, 根据需要修改 ## | |
## 被注释的选项填写的是默认值, 建议在需要修改时再取消注释 ## | |
## 文件保存相关 ## | |
# 文件的保存路径(可使用绝对路径或相对路径), 默认: 当前启动位置 | |
dir=/Users/solarhell/Downloads/aria2 | |
# 启用磁盘缓存, 0为禁用缓存, 需1.16以上版本, 默认:16M | |
#disk-cache=32M | |
# 文件预分配方式, 能有效降低磁盘碎片, 默认:prealloc |
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"os" | |
"golang.org/x/net/proxy" | |
) |
// includes China Mobile, China Unicom, China Telecom | |
const isChinaPhoneNumber = phone => /^1(?:70\d|(?:9[89]|8[0-24-9]|7[135-8]|66|5[0-35-9])\d|3(?:4[0-8]|[0-35-9]\d))\d{7}$/.test(phone) |