Skip to content

Instantly share code, notes, and snippets.

View metowolf's full-sized avatar
:octocat:
开源一时爽,一直开源一直爽

METO metowolf

:octocat:
开源一时爽,一直开源一直爽
View GitHub Profile
@kaimallea
kaimallea / UDPClient.hpp
Created November 25, 2014 21:25
Super simple UDP client using boost
#include <iostream>
#include <boost/array.hpp>
#include <boost/asio.hpp>
using boost::asio::ip::udp;
class UDPClient
{
public:
UDPClient(
@laverboy
laverboy / LogUse.php
Last active June 4, 2024 06:56
A simple, static, logging singleton class
<?php
Log::info("something really interesting happened", ['extra' => 'information', 'about' => 'anything' ]);
@ZetaTwo
ZetaTwo / IDA Pro on Ubuntu 16
Last active September 10, 2020 09:47
Outdated instructions on how to install an old version of IDA Pro on Ubuntu 16
# 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
# 你可以从该 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, 那么这些值会被写入到系统网络代理
# 设置中.)
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
anonymous
anonymous / surge-cn.conf
Created January 18, 2018 07:07
[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
@Blankwonder
Blankwonder / iPhone X
Created September 21, 2018 03:44
Surge Benchmark
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
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 = [];
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)