Skip to content

Instantly share code, notes, and snippets.

;设置规则标志位
surge_ruleset=DIRECT,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/Unbreak.list
surge_ruleset=Advertising,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/Advertising.list
surge_ruleset=Hijacking,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/Hijacking.list
surge_ruleset=Youtube,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/Media/YouTube.list
surge_ruleset=Netflix,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/Media/Netflix.list
surge_ruleset=GlobalMedia,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/GlobalMedia.list
surge_ruleset=HKMTMedia,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/HKMTMedia.list
surge_ruleset=DIRECT,https://subconverter.oss-ap-southeast-1.aliyuncs.com/Rules/RuleSet/ForceDirect.list
surge_ruleset=Proxies,https://subconverter.oss-ap-southeast-1.aliyuncs.com/Rules/RuleSet/ForceProxy.list
package segment
import (
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"sync"
)
@xiocode
xiocode / fix.md
Created August 15, 2019 08:52
批量修改文件权限
for directories
find /desired_location -type d -print0 | xargs -0 chmod 0755
for files
find /desired_location -type f -print0 | xargs -0 chmod 0644
#!/bin/sh /etc/rc.common
# Copyright (C) 2009-2010 OpenWrt.org
START=99
STOP=15
SERVICE_USE_PID=1
CLASH="/etc/clash/clash"
function gitall() {
    git add . -A
    if [ -n "$1" ]; then
        git commit -m "$1"
    else
        git commit -m "update"
    fi
    git push
}
Process: Surge 3 [45724]
Path: /Applications/Surge 3.app/Contents/MacOS/Surge 3
Identifier: com.nssurge.surge-mac
Version: 3.0.2 (731)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Surge 3 [45724]
User ID: 501
Date/Time: 2018-10-16 21:22:28.718 +0800
Sampling process 65649 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling Surge (pid 65649) every 1 millisecond
Process: Surge [65649]
Path: /Applications/Surge.app/Contents/MacOS/Surge
Load Address: 0x10381b000
Identifier: com.nssurge.surge-mac
Version: 2.6.0 (588)
Code Type: X86-64
Parent Process: ??? [1]
@xiocode
xiocode / xunlei.sh
Last active December 19, 2017 09:28
删除Mac版迅雷的多余功能,只保留下载
#!/bin/bash
#
# 使用方法 curl -sSL https://gist.githubusercontent.com/xiocode/87a8fe9dd2973f8d4be53e7b8ee27bd2/raw/xunlei.sh | bash
#
chmod a-x /Applications/Thunder.app/Contents/Bundles/*
chmod a-x /Applications/Thunder.app/Contents/PlugIns/*
chmod a+x /Applications/Thunder.app/Contents/PlugIns/applications.xlplugin
chmod a+x /Applications/Thunder.app/Contents/PlugIns/settings.xlplugin
$ git stash
$ git merge
$ git stash pop
@xiocode
xiocode / Postgres.md
Last active September 25, 2017 10:24