Skip to content

Instantly share code, notes, and snippets.

View OrcaXS's full-sized avatar

OrcaXS

  • Shenzhen, China
View GitHub Profile
@OrcaXS
OrcaXS / curve.html
Last active August 14, 2018 00:49 — forked from uucky/curve.html
Curve Calc
<!DOCTYPE html>
<html>
<head>
<title>Curve</title>
<script defer>
//弧长c 拱高h - 半径r 弦长l
// 圆心角a
function calcR1(h, l) {
const r = ( Math.pow(h,2) + Math.pow((l/2),2) )/ 2/h;
const a = 2 * Math.asin( l / 2 / h );
@OrcaXS
OrcaXS / wireguard.sh
Created August 11, 2018 14:15 — forked from merrickluo/wireguard.sh
wireguard.sh
#!/bin/bash
set -e
[[ $UID != 0 ]] && exec sudo -E "$(readlink -f "$0")" "$@"
up() {
# setup wg0
ip link add dev wg0 type wireguard
ip addr add dev wg0 10.0.200.13/32
wg setconf wg0 /etc/wireguard/wg0.conf
@OrcaXS
OrcaXS / shadowiptables.sh
Last active February 18, 2020 16:13 — forked from qwIvan/shadowiptables.sh
ss-redir + iptables + china_ip_list
#!/bin/sh
# china_ip_list.txt from https://github.com/17mon/china_ip_list
set -x
chnroute_file=./china_ip_list/china_ip_list.txt
src_addr=192.168.100.1/24
gamesrc_addr=192.168.200.1/24
game_port=1082
local_port=1081
clash_dns_port=1053