pacman -S brotli p7zip
curl -L -o /usr/local/bin/sdat2img.py https://github.com/xpirt/sdat2img/raw/master/sdat2img.py && chmod +x sdat2img.py
brotli -d system.new.dat.br
sdat2img.py system.transfer.list system.new.dat system.img
7z -y -bsp0 -bso0 x system.img
This file contains hidden or 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
| #!/bin/bash | |
| cat << EOF > /etc/systemd/system/monthly.timer | |
| [Unit] | |
| Description=Run script monthly | |
| [Timer] | |
| OnCalendar=*-*-01 02:00:00 | |
| [Install] |
This file contains hidden or 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
| @echo off | |
| setlocal | |
| rem https://github.com/eamodio/vscode-gitlens/issues/965#issuecomment-734013893 | |
| set PATH=%~dp0usr\bin;%PATH% | |
| :loop | |
| if "%~1" equ "rev-parse" goto rev_parse | |
| shift |
This file contains hidden or 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
| [Solarized Darcula] | |
| text=d2d8d9 | |
| cyan(bold)=15968d | |
| text(bold)=d2d8d9 | |
| magenta=797fd4 | |
| green=629655 | |
| green(bold)=629655 | |
| background=3d3f41 | |
| cyan=15968d | |
| red(bold)=f24840 |
This file contains hidden or 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
| #!/bin/sh -e | |
| # Converts OpenVZ VPS to Alpine Linux | |
| # WARNING: This script will wipe any data in your VPS! | |
| # GPLv2; Partly based on https://gitlab.com/drizzt/vps2arch | |
| server=http://images.linuxcontainers.org | |
| path=$(wget -O- ${server}/meta/1.0/index-system | \ | |
| grep -v edge | awk '-F;' '($1=="alpine" && $3=="amd64") {print $NF}' | tail -1) | |
| cd / |
BDP = Bandwidth * RTT
e.g.:
Server
SO_RCVBUF: 125000000Bytes (1000Mbps), 0.02s (20ms)
125000000Bytes * 0.02s = 2500000Bytes
SO_SNDBUF: 125000000Bytes (1000Mbps), 0.165s (165ms)
125000000Bytes * 0.165s = 20625000Bytes标签(空格分隔): 密码学
本文介绍目前现代密码学的最先进技术, 前半部分主要翻译自 《Cryptographic Right Answers》,附上收集的资料,和byron个人的理解。
- shadowsocks-libev: v3.3.5-6329526199674ddda8d8396a66072890b244972b
- shadowsocks-rust: v1.10.7
- 测试脚本: https://gist.github.com/pexcn/93b6ae3e137dfc11fda8a01abc6898fa
- 若不知道 CPU 是否支持 AES-NI, 则
chacha20-ietf-poly1305为最稳妥的选择。 - 若 CPU 支持 AES-NI, 则 shadowsocks-rust 选择
aes-128-gcm, shadowsocks-libev 选择aes-256-gcm为最佳。
This file contains hidden or 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
| #!/bin/bash -e | |
| METHOD="$1" | |
| # prepare | |
| docker stop iperf-client ss-client ss-server iperf-server &>/dev/null || true | |
| docker rm iperf-client ss-client ss-server iperf-server &>/dev/null || true | |
| # iperf server | |
| docker run -d --rm --name iperf-server --network host pexcn/docker-images:iperf -s -B 127.0.0.1 -p 10000 >/dev/null |