Skip to content

Instantly share code, notes, and snippets.

@tony1016
tony1016 / clash
Created June 15, 2019 06:48
Openwrt init.d script for clash
#!/bin/sh /etc/rc.common
START=99
STOP=15
USE_PROCD=1
start_service(){
procd_open_instance clash
procd_set_param command /usr/bin/clash -d /etc/clash
@tony1016
tony1016 / shadowiptables.sh
Created July 27, 2017 08:49 — forked from qwIvan/shadowiptables.sh
自动翻墙脚本,配合shadowsocks-libev的ss-redir使用,需要ipset(sudo apt-get install ipset)
#!/bin/bash
#自动翻墙脚本,配合shadowsocks-libev的ss-redir使用。需要ipset
chnroute_file=~/.chnroute
ignore_ips=(
45.32.50.160
45.127.93.239
103.214.68.175
0.0.0.0/8
10.0.0.0/8
127.0.0.0/8
@tony1016
tony1016 / script.user.js
Created July 4, 2016 03:03
115登录助手
// ==UserScript==
// @name 115登录助手
// @namespace no
// @version 0.2
// @description 不用安装客户端了~
// @author space
// @include http://115.com/*
// @grant none
// @downloadURL https://coding.net/u/imspace/p/m115p/git/raw/master/script.user.js
// @updateURL https://coding.net/u/imspace/p/m115p/git/raw/master/script.user.js
def smoSimple(dataMatIn, classLabels, C, toler, maxIter):
"""
简化版SMO算法
:param dataMatIn: X
:param classLabels: Y
:param C: 惩罚参数
:param toler: 容错率
:param maxIter: 最大循环次数
:return:
"""
@tony1016
tony1016 / pdnsd.conf
Last active January 15, 2016 01:47
/usr/local/etc/pdnsd.conf
global {
perm_cache=2048;
cache_dir="/var/cache/pdnsd";
run_as="pdnsd";
server_ip = 0.0.0.0; // Use eth0 here if you want to allow other
// machines on your network to query pdnsd.
server_port = 55533;
status_ctl = on;
query_method=tcp_only; // pdnsd must be compiled with tcp
// query support for this to work.
@tony1016
tony1016 / polipo.conf
Last active December 25, 2015 03:38
/etc/polipo/config
proxyAddress = 0.0.0.0
proxyPort = 8118
socksParentProxy = "127.0.0.1:8964"
socksProxyType = socks5