This file contains 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 | |
# Run multiple parallel instances of iperf client | |
# Assumes iperf servers have been started, e.g. | |
# iperf -s -p PORT | |
# Examples: | |
# Run 5 clients for 60 seconds to server 1.1.1.1 | |
# iperf-multiple-clients 1.1.1.1 5 60 report | |
# 5 files will be created, report-1.1.1.1-5001-60.txt, ... | |
# | |
# Run 7 clients for 20 seconds with UDP |
This file contains 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 $mod Mod4 | |
font pango:monospace 9 | |
#font pango:DejaVu Sans Mono 8 | |
# Use Mouse+$mod to drag floating windows to their wanted position | |
floating_modifier $mod | |
# start a terminal | |
bindsym $mod+Return exec i3-sensible-terminal |
This file contains 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 -g history-limit 4096 | |
setw -g monitor-activity on | |
# Shift arrow to switch windows | |
bind -n S-Left previous-window | |
bind -n S-Right next-window | |
# THEME | |
set -g status-bg black |
This file contains 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
package main | |
import ( | |
"crypto/ecdsa" | |
"errors" | |
"fmt" | |
"github.com/ethereum/go-ethereum/crypto" | |
"io/ioutil" | |
"math/big" | |
"net/http" |
This file contains 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 bash | |
INTERVAL=5 | |
NETPATH="/sys/class/net" | |
RX1_ARR=() | |
TX1_ARR=() | |
RX2_ARR=() | |
TX2_ARR=() | |
while true; do |
This file contains 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 bash | |
EXPORT_FILE="/tmp/pihole.prom" | |
OUT=$(curl -s http://127.0.0.1/admin/api.php?summaryRaw | sed -e 's/\"//g') | |
DNS_DOMAINS_BEING_BLOCKED=$(echo "$OUT" | cut -d, -f1 | cut -d: -f2) | |
DNS_TOTAL=$(echo "$OUT" | cut -d, -f2 | cut -d: -f2) | |
DNS_BLOCKED=$(echo "$OUT" | cut -d, -f3 | cut -d: -f2) | |
DNS_ADS_PCNT=$(echo "$OUT" | cut -d, -f4 | cut -d: -f2) |
This file contains 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 bash | |
do_ping () { | |
local EXPORT_FILE="/tmp/ping_$1.prom" | |
local OUT=$(ping -nq -c $2 $1) | |
local ICMP_SENT=$(echo "$OUT" | grep "packets" | awk '{print $1}') | |
local ICMP_RECV=$(echo "$OUT" | grep "packets" | awk '{print $4}') | |
local ICMP_MIN=$(echo "$OUT" | grep "avg" | awk '{print $4}' | cut -d/ -f1) |
This file contains 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 bash | |
function myecho() { | |
mytime=$( date -u +"%y-%m-%dT%H:%M:%SZ" ) | |
echo "$mytime $1" |tee -a $logpath | |
} | |
target="8.8.8.8" | |
size="1" | |
interval="1" |
This file contains 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
from pysnmp import hlapi | |
import argparse | |
def construct_object_types(list_of_oids): | |
object_types = [] | |
for oid in list_of_oids: | |
object_types.append(hlapi.ObjectType(hlapi.ObjectIdentity(oid))) | |
return object_types | |
def construct_value_pairs(list_of_pairs): |
This file contains 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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io" | |
"net" | |
"os" | |
"strings" | |
) |