Skip to content

Instantly share code, notes, and snippets.

@Earne
Earne / v2ray_openvpn_netflix.md
Created May 23, 2022 03:19 — forked from zpoint/v2ray_openvpn_netflix.md
v2ray + openvpn to unblock gfw and netflix

Two things need to be paid

  • vps(such as bandwagonhost)
    • If you are using China Telecom, a CN2 network is required, or you may get stuck when streaming video
    • For bandwagonhost, you need to login, click Client Area -> Services -> Order New Services to get CN2 server
  • vpn vendor to unblock netflix(a openvpn connection that can unblock netflix)

vpn

The basic idea is setup a socks5 proxy to forawrd all network traffic from the socks5 to a specific openvpn, in v2ray, forward all the netflix traffic to the socks5 proxy

@Earne
Earne / B
Created September 26, 2015 02:39
Rainfall
Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)
Problem Description:
葫芦大道(The Hulu Way)上有N间房子,分别位于坐标Ai 。这里常年多雨,一年能有近10w天在下雨(可怕。。。)。葫芦大道上还住着一位武男,他统计了这一年下雨的情况,每次下雨他会记下三个数据,Li,Ri和Wi,表示今天所有坐标在Li和Ri之间(包括Li和Ri)的所有房子,都淋了Wi这么长时间的雨。现在武男想知道,这一年里,每间房子总共都淋了多长时间的雨。
输入
输入的第一行是一个整数N(1 <= N <= 10^5)。
接下来一行N个整数Ai(0 <= Ai < 2^31),房子的坐标按递增序给出。
接下来一行是整数M(1 <= M <= 10^5)。
然后M行,每行三个整数分别为Li,Ri(0 <= Li <= Ri < 2^31)和Wi(1 <= Wi <= 10^4)。
输出
@Earne
Earne / A
Created September 26, 2015 02:29
战斗吧葫芦娃
Time Limit: 3000/2000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)
Problem Description:
葫芦娃被蛇精派来的N个小妖怪包围了,对于第i(1≤i≤N)个小妖怪,其生命值为Li点,每秒对葫芦娃造成的伤害为Di点每秒。葫芦娃每次只能攻击一个小妖怪,造成伤害1点。当小妖怪生命值降为0后,小妖怪死亡。 请问葫芦娃要消灭所有小妖怪最少要受到多少点伤害?
数据限制
1 ≤ Li ≤ 1000
1 ≤ Di ≤ 1000
对于20%的数据,N ≤ 8
对于60%的数据,N ≤ 16

浅谈《【原创】深度分析Twitter Heron》

有幸拜读了《【原创】深度分析Twitter Heron》 ( http://www.longda.us/?p=529 )一文,十分感动国内社区对Heron的关注。但此文中有诸多重要问题值得商榷,我谨在此行文指出,还望能够帮助大家更好的理解Heron。转载烦请注明出处:https://gist.github.com/maosongfu/c3aeb1bb5eb7b39fcdc5

我是符茂松,目前在Twitter工作,是Heron的作者之一。这个领域水深,我也是初窥门径,希望能够与大家多多交流。

微博:符茂松

Twitter: Louis_Fumaosong

Intro

The plan is to create a pair of executables (ngrok and ngrokd) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other ngrok to connect to this ngrokd, and vice versa.

DNS

Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is domain.com, you'll need a record for that and for *.domain.com.

Different Operating Systems