Install, build and debug a react native app in WSL2 (Windows Subsystem for Linux) and Ubuntu.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* ESLint的JSON文件是允许JavaScript注释的,但在gist里显示效果不好,所以我把.json文件后缀改为了.js | |
*/ | |
/* | |
* ESLint 配置文件优先级: | |
* .eslintrc.js(输出一个配置对象) | |
* .eslintrc.yaml | |
* .eslintrc.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VERSION="0.1" | |
DESCRIPTION="Command/Subcommand line script template" | |
usage() { | |
echo "Usage: $0 [ subcommand [-c num] ] [-v]" 1>&2; exit 1; | |
} | |
subcommand() { | |
local OPTIND |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################################################### | |
### USAGE: rdiff path/to/left,path/to/right [-s path/to/summary/dir] ### | |
### ADD LOCATION OF THIS SCRIPT TO PATH ### | |
######################################################################### | |
[CmdletBinding()] | |
param ( | |
[parameter(HelpMessage="Stores the execution working directory.")] | |
[string]$ExecutionDirectory=$PWD, | |
[parameter(Position=0,HelpMessage="Compare two directories recursively for differences.")] |
由于路由管控系统的建立,实时动态黑洞路由已成为最有效的封锁手段,TCP连接重置和DNS污染成为次要手段,利用漏洞的穿墙方法已不再具有普遍意义。对此应对方法是多样化协议的VPN来抵抗识别。这里介绍一种太简单、有时很朴素的“穷人VPN”。
朴素VPN只需要一次内核配置(Linux内核),即可永久稳定运行,不需要任何用户态守护进程。所有流量转换和加密全部由内核完成,原生性能,开销几乎没有。静态配置,避免动态握手和参数协商产生指纹特征导致被识别。并且支持NAT,移动的内网用户可以使用此方法。支持广泛,基于L2TPv3标准,Linux内核3.2+都有支持,其他操作系统原则上也能支持。但有两个局限:需要root权限;一个隧道只支持一个用户。
朴素VPN利用UDP封装的静态L2TP隧道实现VPN,内核XFRM实现静态IPsec。实际上IP-in-IP隧道即可实现VPN,但是这种协议无法穿越NAT,因此必须利用UDP封装。内核3.18将支持Foo-over-UDP,在UDP里面直接封装IP,与静态的L2TP-over-UDP很类似。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
good, 你已经有了一个自己的shadowsocks代理了,现在想要把这个代理公布出去给所有人分享。 | |
但是没有两个小时,代理就没法使用了,为什么?因为你需要额外注意以下事项(以下步骤需要比较高的linux技能) | |
本文只关注于确保shadowsocks服务还“活着”,如果你希望让其跑得更快,请参考 | |
https://github.com/clowwindy/shadowsocks/wiki/Optimizing-Shadowsocks | |
1、 shadowsocks的timeout设置 | |
超时时间越长,连接被保持得也就越长,导致并发的tcp的连接数也就越多。对于公共代理,这个值应该调整得小一些。推荐60秒。 | |
2、 检查操作系统的各种限制 | |
对于openvz的vps,特别需要检查一下 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GFWLIST=https://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt | |
PROXY=127.0.0.1:7070 | |
cd `dirname "${BASH_SOURCE[0]}"` | |
echo "Downloading gfwlist from $GFWLIST" | |
curl "$GFWLIST" --socks5-hostname "$PROXY" > /tmp/gfwlist.txt | |
/usr/local/bin/gfwlist2pac \ | |
--input /tmp/gfwlist.txt \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding: utf8 -*- | |
import urllib2 | |
import urllib | |
from cookielib import CookieJar | |
import pdb | |
import time | |
def check_process(): | |
import subprocess | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
parse_yaml() { | |
local prefix=$2 | |
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') | |
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ | |
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | | |
awk -F$fs '{ | |
indent = length($1)/2; | |
vname[indent] = $2; | |
for (i in vname) {if (i > indent) {delete vname[i]}} |
NewerOlder