Skip to content

Instantly share code, notes, and snippets.

View microlinux's full-sized avatar
🚒
Bathing in hot sauce

Herr Schnitzel microlinux

🚒
Bathing in hot sauce
  • El Baño
View GitHub Profile
@microlinux
microlinux / exabgp.conf
Created August 22, 2018 05:20
ExaBGP config template
[exabgp.api]
ack = true
chunk = 1
cli = true
compact = false
encoder = json
pipename = 'exabgp'
respawn = true
terminate = false
@microlinux
microlinux / exabgp.py
Last active September 19, 2021 21:45
def get_command_output(timeout):
"""Reads command output from stdin and returns a list of lines.
Acks ('done' or 'error') are filtered out. Thus, commands
which produce no other output will result in an empty list.
Args:
timeout (int|float): Seconds to wait for output.
Returns:
@microlinux
microlinux / tardis.py
Last active August 27, 2018 01:56
Tello Advanced Remote Drone Interface System (TARDIS)
#!/usr/bin/env python
# This program requires the Python Tello module at https://github.com/microlinux/tello
import argparse
import curses
import tello # https://github.com/microlinux/tello
import time
import traceback
@microlinux
microlinux / tello.py
Last active February 14, 2021 02:42
Python interface for the Ryze Tello drone
"""3/21/2018 DEVELOPMENT HAS MOVED TO https://github.com/microlinux/tello"""
"""License.
Copyright 2018 Todd Mueller <[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@microlinux
microlinux / shif.sh
Created August 25, 2015 02:08
A script to add commands to EdgeOS that show ethernet/vif traffic
#!/bin/bash
# a script to add commands to EdgeOS that show ethernet/vif traffic
#
# default measurement period is 5 seconds
# probably extendable to any interface in /proc/net/dev
# see 'shif.sh -h' for standalone use
#
# install: sudo chmod 755 shif.sh
# sudo ./shif.sh install

Keybase proof

I hereby claim:

  • I am microlinux on github.
  • I am microlinux (https://keybase.io/microlinux) on keybase.
  • I have a public key whose fingerprint is 7F58 E84E E0E9 3724 46ED 86F7 8C6D AF17 BA0B ADE8

To claim this, I am signing this object:

@microlinux
microlinux / mping.sh
Last active December 10, 2021 16:37
Pings multiple hosts concurrently and prints results in CSV format
#!/bin/bash
# this program is placed into the public domain
# https://gist.github.com/microlinux/77feda4449a8041a19a7
#
# THIS FILE MUST BE IN YOUR SYSTEM PATH
#
# defaults
@microlinux
microlinux / sping.sh
Created February 12, 2015 08:02
Ping IPs by subnet and show simple up/down status
#!/bin/bash
# [user@server ~]$ sping.sh 70.120.121.0/29
# 70.120.121.1 down
# 70.120.121.2 up
# 70.120.121.3 up
# 70.120.121.4 up
# 70.120.121.5 up
# 70.120.121.6 up
@microlinux
microlinux / zping.sh
Last active August 28, 2023 13:28
Bash script for storing ping data in RRDs and graphing that data
#!/bin/bash
#
# INSTALL
# -------
# 1.) Create directory structure
# <base_dir>
# <base_dir>\bin
# <base_dir>\etc
# <base_dir>\log
# <base_dir>\rrd
@microlinux
microlinux / nfcpud.py
Last active May 2, 2018 09:54
OpenVZ container abusive process killer
#!/usr/bin/python
"""
nfcpud: a daemon for killing abusive container processes on openvz nodes
requires: python daemon module (centos: yum install python-daemon)
ncpud measures average process cpu usage over 5 second intervals. based on
parameters defined in config files, processes are killed if they meet any of 3