Skip to content

Instantly share code, notes, and snippets.

View oilbeater's full-sized avatar
🎯
Focusing

Mengxin Liu oilbeater

🎯
Focusing
View GitHub Profile
@mcastelino
mcastelino / tc mirroring.md
Last active October 19, 2024 15:35
Using tc redirect to connect a virtual machine to a container network

Connecting a veth device to tap

  • veth device from CNI/CNM plugin: eth0
  • tap device that connects to the VM: tap0

Redirecting traffic between the two devices

tc qdisc add dev eth0 ingress
tc filter add dev eth0 parent ffff: protocol all u32 match u8 0 0 action mirred egress redirect dev tap0
@jarek-przygodzki
jarek-przygodzki / centos-install-kernel-debuginfo.sh
Created February 16, 2017 20:23
CentOS 7 - How to install kernel-debuginfo
yum --enablerepo=base-debuginfo install -y kernel-debuginfo-$(uname -r)
@imbyron
imbyron / qiubai.py
Last active December 22, 2015 14:18
糗百命令行版,最近学习正则表达式,抛弃了bs4,写了这么一个小爬虫,爬了糗百最近7天最热门的糗事儿。
#!/usr/bin/python
#coding:utf-8
#作者:Byron
#博客:http://jiabin.tk
import urllib2
import re
#定义程序主函数
def qiubai(page):