Skip to content

Instantly share code, notes, and snippets.

View lyekumchew's full-sized avatar
🐢
SLOW DANCING

AUTUMN lyekumchew

🐢
SLOW DANCING
  • 00:50 (UTC +08:00)
View GitHub Profile
@lyekumchew
lyekumchew / 🎵 My Spotify Top Tracks
Last active February 6, 2022 06:05
🎵 My Spotify Top Tracks
Godzilla (feat. Juice W Eminem & Juice WRLD
Stan Eminem & Dido
Without Me Eminem
'Till I Collapse Eminem & Nate Dogg
Irremplaçable Astride Perrot
Book of Rhymes (feat. D Eminem & DJ Premier
Alfred’s Theme Eminem
Love The Way You Lie Eminem & Rihanna
Tone Deaf Eminem
Favorite Bitch (feat. T Eminem & Ty Dolla
@lyekumchew
lyekumchew / curl.md
Created August 29, 2020 12:13 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

代理服务器 Cake 队列规则常用参数推荐

为什么选用 Cake

Cake 使用主动队列管理(AQM)技术保持全局同步,可以控制延迟,有效利用宽带。同时它还可以保证每个主机,每个流公平的分享宽带。

使用 Cake 的条件

Cake 与 kernel 4.19 并入主线,因此使用 Cake 需要 kernel 和 iproute2 版本大于 4.19。如何确认 kernel 和 iproute2 版本,以及如何升级本文不做详细说明。

如何启用 Cake

以 root 身份执行命令 tc qdisc replace dev eth0 root cake,其中 eth0 是网络接口名。

# /etc/systemd/system/gost@.service
[Unit]
Description=GO Simple Tunnel
After=network.target
[Service]
Type=simple
LimitNOFILE=1048576
Restart=always
@lyekumchew
lyekumchew / .bashrc
Last active April 7, 2020 05:08
hadoop
# Hadoop settings
export HDFS_NAMENODE_USER="hduser"
export HDFS_DATANODE_USER="hduser"
export HDFS_SECONDARYNAMENODE_USER="hduser"
export YARN_RESOURCEMANAGER_USER="hduser"
export YARN_NODEMANAGER_USER="hduser"
export HADOOP_HOME=/home/hduser/hadoop-3.2.1
export PATH=$PATH:$HADOOP_HOME/bin
export PATH=$PATH:$HADOOP_HOME/sbin
export HADOOP_MAPRED_HOME=$HADOOP_HOME
# Disabled ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
# Enable BBR
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr
@lyekumchew
lyekumchew / calc.sh
Last active March 17, 2020 08:38
iperf3
#!/bin/bash
function calc() {
res=0
for file in $(ls $3/single_$1_*$2*); do
tmp=$(tac $file | sed -n 4p | awk '{print $7}')
res=$(echo "${res}+${tmp}"|bc)
done
echo "time:" $i "threads:" $j "result:" $res
}
#!/bin/bash
config_dir="$HOME/.wireguard/"
mkdir -p "$config_dir"
cd "$config_dir" || {
echo 切换目录失败,程序退出
exit
}
# 生成两对密钥,分别用作服务器和客户端使用
#!/bin/bash
# numactl -> /usr/bin//usr/bin/numactl
# iperf -> /usr/bin//usr/bin/iperf
# tcp server
# /usr/bin/numactl -N 0-3 /usr/bin/iperf -s
# udp server
# /usr/bin/numactl -N 0-3 /usr/bin/iperf -u -s