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
package main | |
import ( | |
"context" | |
"fmt" | |
"time" | |
) | |
func BatchStringsCtx(ctx context.Context, values <-chan string, maxItems int, maxTimeout time.Duration) chan []string { | |
batches := make(chan []string) |
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
function replaceAll(str, find, replace) { | |
return str.replace(new RegExp(find, 'g'), replace); | |
} | |
function dec2hex(dec, padding){ | |
return parseInt(dec, 10).toString(16).padStart(padding, '0'); | |
} | |
function utf8StringToUtf16String(str) { | |
var utf16 = []; |
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
AEAD Provider: CommonCrypto (Hadrware acceleration) | |
Generating random data (100.00MB) | |
Start benchmark rc4 | |
Encrypt data in 0.215s | |
Decrypt data in 0.257s | |
Data integrity check completed | |
Start benchmark rc4-md5 | |
Encrypt data in 0.176s | |
Decrypt data in 0.256s | |
Data integrity check completed |
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
[General] | |
loglevel = notify | |
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 127.0.0.1, localhost, *.local | |
ipv6 = false | |
exclude-simple-hostnames = true | |
allow-wifi-access = false | |
dns-server = 114.114.114.114, 223.5.5.5, system | |
[Rule] | |
# Apple |
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
Generating random data (100.00MB) | |
Start benchmark rc4-md5 | |
Encrypt data in 0.224s | |
Decrypt data in 0.222s | |
Start benchmark aes-128-cfb | |
Encrypt data in 0.599s | |
Decrypt data in 0.597s | |
Start benchmark aes-256-cfb |
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
# 你可以从该 URL 下载这个配置文件: http://surge.run/config-example/ios.conf | |
# 用编辑器编辑后,再通过 iTunes, URL, AirDrop 或者 iCloud Drive 复制回 iOS 设备 | |
# Version 2.0 | |
[General] | |
# 日志等级: warning, notify, info, verbose (默认值: notify) | |
loglevel = notify | |
# 跳过某个域名或者 IP 段,这些目标主机将不会由 Surge Proxy 处理。(在 macOS | |
# 版本中,如果启用了 Set as System Proxy, 那么这些值会被写入到系统网络代理 | |
# 设置中.) |
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
# Note: These instructions are outdated and no longer relevant | |
ln -s /tmp /usr/tmp | |
ln -s /lib64/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3 | |
dpkg --add-architecture i386 | |
apt-get install libglib2.0-0:i386 gtk2-engines:i386 gtk2-engines-murrine:i386 gtk2-engines-pixbuf:i386 |
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
<?php | |
Log::info("something really interesting happened", ['extra' => 'information', 'about' => 'anything' ]); |
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
#include <iostream> | |
#include <boost/array.hpp> | |
#include <boost/asio.hpp> | |
using boost::asio::ip::udp; | |
class UDPClient | |
{ | |
public: | |
UDPClient( |