Skip to content

Instantly share code, notes, and snippets.

@chenhuawei
chenhuawei / kafka.sh
Last active August 1, 2019 14:40
kafka cli
./kafka-consumer-groups.sh --new-consumer --bootstrap-server localhost:9092 --list
./kafka-consumer-groups.sh --new-consumer --bootstrap-server localhost:9092 --group Lbs --describe
./kafka-console-consumer.sh --zookeeper localhost:2181 --topic lbs.location
./kafka-topics.sh --zookeeper localhost:2181 --list
./kafka-topics.sh --zookeeper localhost:2181 --describe --topic lbs.location
@chenhuawei
chenhuawei / vpn.sh
Created January 8, 2018 09:13
L2TP VPN
# 不使用共享密钥
vim /etc/ppp/options
plugin L2TP.ppp
l2tpnoipsec
# 添加静态路由
sudo /sbin/route add -net 168.100.0.0/16 -interface ppp0
@chenhuawei
chenhuawei / rm_DS_Store.sh
Created January 8, 2018 03:59
rm .DS_Store files
sudo find / -name ".DS_Store" -depth -exec rm {} \;
@chenhuawei
chenhuawei / cp.sh
Created December 16, 2017 13:08
shell
#复制XML文件到resources目录并保持目标结构
find . -name '*.xml' -exec gcp --parents \{\} ../resources \;
@chenhuawei
chenhuawei / ubuntu.sh
Last active December 2, 2017 09:00
ubuntu commands
# 查看服务启动日志
journalctl -u nexus.service
# 查看ubuntu版本
sudo lsb_release -a