Skip to content

Instantly share code, notes, and snippets.

View bilxio's full-sized avatar

Bill Xiong bilxio

  • Shanghai, China
View GitHub Profile
cat > /etc/apt/sources.list << EOF
deb https://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free
@bilxio
bilxio / .editorconfig
Last active September 19, 2023 22:47
Prettier + ESLint + TS + React
root = true
[*]
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
end_of_line=lf
[*.{ts,tsx,js,jsx,css,scss}]
indent_style = space
@bilxio
bilxio / ubuntu16.md
Created November 7, 2018 05:56
save-iptables

save

open or create iptables script

# vim /etc/network/if-post-down.d/iptables

write these lines

#!/bin/bash
@bilxio
bilxio / iptables-tcp-forward.sh
Created October 18, 2018 05:06
TCP traffics forwarding via iptables-nat
# 将 12XXX 端口转发至 100.XX.XX.XX:2XXX
iptables -t nat -A PREROUTING -p tcp --dport 12XXX -j DNAT --to-destination 100.XX.XX.XX:2XXX
# 将 100.XX.XX.XX:2XXX 回复的数据包源地址修改为 139.XX.XX.XX
# 注意:如果是 ECS 等网卡不是公网地址的,请设置为网卡实际地址
iptables -t nat -A POSTROUTING -p tcp -d 100.XX.XX.XX --dport 2XXX -j SNAT --to-source 139.XX.XX.XX
@bilxio
bilxio / iptables-tcp-forward.sh
Created October 18, 2018 05:06
TCP traffics forwarding via iptables-nat
# 将 12XXX 端口转发至 100.XX.XX.XX:2XXX
iptables -t nat -A PREROUTING -p tcp --dport 12XXX -j DNAT --to-destination 100.XX.XX.XX:2XXX
# 将 100.XX.XX.XX:2XXX 回复的数据包源地址修改为 139.XX.XX.XX
# 注意:如果是 ECS 等网卡不是公网地址的,请设置为网卡实际地址
iptables -t nat -A POSTROUTING -p tcp -d 100.XX.XX.XX --dport 2XXX -j SNAT --to-source 139.XX.XX.XX
@bilxio
bilxio / init-centos7.md
Created October 11, 2018 10:52
install apps for mini centos7

安装 net-tools

centos7 最小化安装之后,默认是没有 ifconfig,netstat命令的

$ sudo yum install -y net-tools

安装 nginx

@bilxio
bilxio / passwords.ts
Last active August 8, 2025 14:27
common password from Exmail of qq
var clearPsw:string = "a123456789;1qaz2wsx;qq123456;1q2w3e4r;123456abc;abcd1234;abc123456;a12345678;a1234567;1234qwer;123456789a;aa123456;123456aa;qwer1234;asd123456;code8925;ms0083jxj;123456qq;asdf1234;q1w2e3r4;12345678a;woaini1314;1234abcd;123qweasd;1qazxsw2;kingcom5;zxcvbnm123;1q2w3e4r5t;123456asd;qwe123456;woaini123;z123456789;1234567a;qazwsx123;123321aa;q123456789;qaz123456;zhang123;1234567b;woaini520;google250;zxc123456;123456qwe;12qwaszx;as123456;qq123123;a123456a;a1b2c3d4;abc12345;zaq12wsx;1a2b3c4d;12345qwert;a123123123;a5201314;w123456789;aptx4869;123456ab;123456789q;qw123456;li123456;abcd123456;aa123123;123qwe123;woaini521;P@ssw0rd;ab123456;q1w2e3r4t5;abc123456789;123456as;wang123456;p@ssw0rd;lb851210;12345abcde;zz123456;q1234567;12345678A@#;liu123456;123456zx;aini1314;qwert12345;qq123456789;1234asdf;123456abcd;passw0rd;123456qaz;tzwadmin123;123123aa;qq5201314;q12345678;zx123456;hyjzstx8;A123456789;qweasd123;5201314a;ds760206;a1s2d3f4;z1234567;asdf123456;1qaz1qaz;zxcv1234;admin123;1QAZ2WSX;asd12345;
@bilxio
bilxio / Message.java
Created August 1, 2018 03:22
使用 GSON 解析 SpotPlanCreate 消息包
package cc.billworks.demo.spotplan;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class Message<T> implements Serializable {
@bilxio
bilxio / main.go
Created December 17, 2017 15:32
sorting in Golang
package main
import (
"sort"
"fmt"
)
type Msg struct {
Name string
Size int
@bilxio
bilxio / login-ssh-trap-WINCH.expect
Created November 29, 2017 07:32
使用 expect 自动登录 ssh,修复 WINCH 信号传递
#!/usr/bin/expect -f
# 捕获 WINCH 信号,并传递给 Spawned 出来的 Children,
# 这样 ssh 的 TTY 就能随着窗口 resize 而适应。
trap {
set rows [stty rows]
set cols [stty columns]
stty rows $rows columns $cols < $spawn_out(slave,name)
} WINCH