Skip to content

Instantly share code, notes, and snippets.

View kookxiang's full-sized avatar
🪲
code once, bug everywhere

Xiang Liu kookxiang

🪲
code once, bug everywhere
View GitHub Profile
@NaniteFactory
NaniteFactory / messagebox.go
Last active April 24, 2024 17:58
Win32 API MessageBox() in Golang
import (
"syscall"
"unsafe"
)
// MessageBox of Win32 API.
func MessageBox(hwnd uintptr, caption, title string, flags uint) int {
ret, _, _ := syscall.NewLazyDLL("user32.dll").NewProc("MessageBoxW").Call(
uintptr(hwnd),
uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(caption))),
@haotian-liu
haotian-liu / express-company.js
Last active February 19, 2020 09:58
A javascript that can differentiate the express IDs of different express companies
var jsoncom = {
'company': [{
'companyname': '申通快递',
'shortname': '申通',
'tel': '95543',
'url': 'st',
'code': 'shentong',
'hasvali': 0,
'comurl': 'http://www.sto.cn',
'isavailable': '0',
@fqrouter
fqrouter / readme.txt
Last active April 16, 2023 18:10
shadowsocks 公共代理的必要设置
good, 你已经有了一个自己的shadowsocks代理了,现在想要把这个代理公布出去给所有人分享。
但是没有两个小时,代理就没法使用了,为什么?因为你需要额外注意以下事项(以下步骤需要比较高的linux技能)
本文只关注于确保shadowsocks服务还“活着”,如果你希望让其跑得更快,请参考
https://github.com/clowwindy/shadowsocks/wiki/Optimizing-Shadowsocks
1、 shadowsocks的timeout设置
超时时间越长,连接被保持得也就越长,导致并发的tcp的连接数也就越多。对于公共代理,这个值应该调整得小一些。推荐60秒。
2、 检查操作系统的各种限制
对于openvz的vps,特别需要检查一下