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
| v=0.13.0 | |
| version=v$v | |
| file=snmp_exporter-$v.linux-amd64 | |
| service=snmp_exporter | |
| wget https://github.com/prometheus/snmp_exporter/releases/download/$version/$file.tar.gz \ | |
| -O /tmp/$file.tar.gz |
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
| version=v0.14.0 | |
| uname -m | grep v7 | |
| if [ $? -eq 0 ]; then | |
| file=node_exporter-0.14.0.linux-armv7 | |
| else | |
| file=node_exporter-0.14.0.linux-armv6 | |
| fi | |
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
| # netcheck --dns google.com@8.8.8.8 --ping 8.8.8.8 --dhcp 192.168.0.1 | |
| for OPT in "$@" | |
| do | |
| case "$OPT" in | |
| --dns) | |
| d=`echo $2 | sed -e "s/@/ /"` | |
| addr=`echo $d | cut -f1 -d " "` | |
| server=`echo $d | cut -f2 -d " "` |
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
| cd /tmp | |
| wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz | |
| wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz | |
| wget http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz | |
| gunzip GeoIP.dat.gz | |
| gunzip GeoLiteCity.dat.gz | |
| gunzip GeoIPASNum.dat.gz |
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
| ip -o a | grep wlp | grep "inet " | grep -E "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/[0-9]+" -o |
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
| v=2.10.0 | |
| version=v$v | |
| file=gobgp_${v}_linux_amd64 | |
| service=gobgpd | |
| wget https://github.com/osrg/gobgp/releases/download/${version}/${file}.tar.gz \ | |
| -O /tmp/$file.tar.gz | |
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
| set nocompatible | |
| set number | |
| set autoindent | |
| set shiftwidth=2 | |
| set softtabstop=2 | |
| set tabstop=2 | |
| set expandtab | |
| set list | |
| set listchars=tab:>-,trail:-,extends:> | |
| set noundofile |
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
| #!/usr/bin/env python3 | |
| import argparse | |
| import logging | |
| logging.getLogger("scapy.runtime").setLevel(logging.ERROR) | |
| from scapy.all import * | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("-r", "--read", required=True, help="filename", default=None) | |
| args = parser.parse_args() |
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
| brctl addbr yabai | |
| ip link set dev yabai up | |
| ip a a 192.168.100.10/24 dev yabai | |
| ip link add y-to-ns1 type veth peer name ns1-to-y | |
| ip link add y-to-ns2 type veth peer name ns2-to-y | |
| ip netns add ns1 | |
| ip netns add ns2 |
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
| set nocompatible | |
| set number | |
| set autoindent | |
| set shiftwidth=2 | |
| set softtabstop=2 | |
| set tabstop=2 | |
| set expandtab | |
| set list | |
| set listchars=tab:>-,trail:-,extends:> | |
| set noundofile |