Skip to content

Instantly share code, notes, and snippets.

View xh4n3's full-sized avatar
🎯
Focusing

Shane Xie xh4n3

🎯
Focusing
  • Alibaba Cloud
  • Hangzhou, China
  • X @xh4n3
View GitHub Profile
@xh4n3
xh4n3 / Surge.md
Last active June 16, 2020 07:42
Surge

Feature

  • 替代 PAC,实现根据规则区分选择代理线路
  • 支持 SOCKS5 和 Shadowsocks 协议
  • 完整支持所有的 Shadowsocks 加密方式 (table, rc4-md5, salsa20, chacha20, aes-256-cfb, aes-192-cfb, aes-128-cfb, bf-cfb, cast5-cfb, des-cfb, rc2-cfb, rc4, seed-cfb)
  • 全面支持双向 HTTP Keep-Alvie
  • 快,各种黑科技加速
  • 直接临时修改某个域名的访问规则 (暂时仅 Mac 版本)
  • 支持使用 GeoIP 规则决定线路

Usage

@xh4n3
xh4n3 / surge.conf
Created October 5, 2015 11:53 — forked from janlay/README.md
Yet another config for Surge.app
# This config file was created for myself (@janlay). You may want to add or remove some rules to make efficient use of the Internet.
[General]
# warning, notify, info, verbose
loglevel = notify
# bypass HTTP persistent connections
bypass = e.crashlytics.com
[Proxy]
# http, https, socks5
@xh4n3
xh4n3 / get-watchers.js
Created March 3, 2016 09:05 — forked from kentcdodds/get-watchers.js
Get Watchers of element and its children
function getWatchers(root) {
root = angular.element(root || document.documentElement);
var watcherCount = 0;
function getElemWatchers(element) {
var isolateWatchers = getWatchersFromScope(element.data().$isolateScope);
var scopeWatchers = getWatchersFromScope(element.data().$scope);
var watchers = scopeWatchers.concat(isolateWatchers);
angular.forEach(element.children(), function (childElement) {
watchers = watchers.concat(getElemWatchers(angular.element(childElement)));
<!DOCTYPE html>
<html>
<head>
<script src="https://fb.me/react-with-addons-0.14.7.min.js"></script>
<script src="https://fb.me/react-dom-0.14.7.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://npmcdn.com/redux@latest/dist/redux.min.js"></script>
@xh4n3
xh4n3 / bash-cheatsheet.sh
Created September 22, 2016 09:09 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04