Skip to content

Instantly share code, notes, and snippets.

@nhalstead
nhalstead / .rc_extra
Last active September 16, 2024 18:25
Handy Bash Scripts for Development using docker containers in a namespace fashion built from a docker compose script using DockerStation and Kubernetes cluster.
# Bash Functions to load into the shell environment
alias chmox="chmod +x"
alias claer="clear"
alias exiut="exit"
alias exuit="exit"
@teknoraver
teknoraver / tcp_psh.c
Created August 5, 2019 10:13
Sample XDP/tc program, sets the TCP PSH flag on some TCP packets
#include <stdint.h>
#include <arpa/inet.h>
#include <asm/byteorder.h>
#include <linux/bpf.h>
#include <linux/if_ether.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/pkt_cls.h>
/*
@qiuchengxuan
qiuchengxuan / netconf_huawei.py
Last active October 20, 2022 18:56
Access Huawei switch via NETCONF with python script
#!/usr/bin/python
import sys
import code
from lxml import etree
from lxml.builder import E
from ncclient import manager
_, ip, user, passwd = sys.argv
netconf = manager.connect(host=ip, port=830, username=user, password=passwd,