Skip to content

Instantly share code, notes, and snippets.

View OrcaXS's full-sized avatar

OrcaXS

  • Shenzhen, China
View GitHub Profile
@OrcaXS
OrcaXS / download.py
Created August 5, 2018 09:04
Update download.py to remove ssl cert
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import hashlib
import os
import sys
# when pylint runs the third_party module is the one from depot_tools
# pylint: disable=E0611
from third_party import fancy_urllib
@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 / 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 );