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
obj-m := client_example.o | |
KDIR := /lib/modules/$(shell uname -r)/build | |
PWD := $(shell pwd) | |
default: | |
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules |
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 | |
#============================================== | |
# Author: Ricky.K | |
# Description: Auto telnet and run command | |
#============================================== | |
echo "My own command..." && | |
(sleep 1; echo "user"; \ | |
sleep 1; echo "password"; \ | |
sleep 1; echo "cd /usr/local"; \ | |
sleep 1; echo "./test.sh"; \ |
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 | |
set -e | |
VERSION=LATEST | |
#If you prefer a specific version you can set it specifically | |
#VERSION=7.66.0 | |
GPG_KEY_URL="https://daniel.haxx.se/mykey.asc" | |
GPG_KEY_PATH="/out/curl-gpg.pub" | |
#Do not escape the above variables in script below | |
#change last argument to -xeus for help with debugging |
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 | |
# Usage: ./who_is_listening.sh <PORT> | |
echo "What process is listening to $1" | |
lsof -nP -i4TCP:$1 | grep LISTEN |
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 | |
# Usage: ./who_is_listening.sh <PORT> | |
echo "What process is listening to $1" | |
lsof -nP -i4TCP:$1 | grep LISTEN |
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
# 重置kubeadm | |
echo "----------------重置系统环境--------------------" | |
sudo kubeadm reset | |
# 重置iptables | |
iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X | |
sudo sysctl net.bridge.bridge-nf-call-iptables=1 | |
# 重置网卡信息 | |
sudo ip link del cni0 |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-dp | |
labels: | |
app: nginx | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: |
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 | |
ISO=GoboLinux-016.01-x86_64.iso | |
IMG=sda.img | |
OUTIFACE=wlan0 | |
NETWORK_OPTS="-net nic,macaddr=E0:06:E6:CE:FF:EE,model=virtio -net tap,ifname=tap1,script=no" | |
KVM_OPTS="-enable-kvm -cpu host -daemonize" | |
BOOT_DRIVE="$1" |
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
# Generated by iptables-save v1.6.1 on Mon Oct 26 11:55:22 2020 | |
*raw | |
:PREROUTING ACCEPT [5751065:1174679472] | |
:OUTPUT ACCEPT [5736441:1152388541] | |
:CILIUM_OUTPUT_raw - [0:0] | |
:CILIUM_PRE_raw - [0:0] | |
-A PREROUTING -m comment --comment "cilium-feeder: CILIUM_PRE_raw" -j CILIUM_PRE_raw | |
-A OUTPUT -m comment --comment "cilium-feeder: CILIUM_OUTPUT_raw" -j CILIUM_OUTPUT_raw | |
-A CILIUM_OUTPUT_raw -o lxc+ -m mark --mark 0xa00/0xfffffeff -m comment --comment "cilium: NOTRACK for proxy return traffic" -j NOTRACK | |
-A CILIUM_OUTPUT_raw -o cilium_host -m mark --mark 0xa00/0xfffffeff -m comment --comment "cilium: NOTRACK for proxy return traffic" -j NOTRACK |
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 | |
APP_NAME="${0##*[\\/]}" | |
APP_VERSION="1.0" | |
#颜色定义 | |
iSumColor=7 #颜色总数 | |
cRed=1 #红色 | |
cGreen=2 #绿色 | |
cYellow=3 #××× |