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 bash | |
| INTERVAL=5 | |
| NETPATH="/sys/class/net" | |
| RX1_ARR=() | |
| TX1_ARR=() | |
| RX2_ARR=() | |
| TX2_ARR=() | |
| while true; do |
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
| package main | |
| import ( | |
| "crypto/ecdsa" | |
| "errors" | |
| "fmt" | |
| "github.com/ethereum/go-ethereum/crypto" | |
| "io/ioutil" | |
| "math/big" | |
| "net/http" |
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 -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 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 $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 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 | |
| # 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 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 bash | |
| FAIL='\033[0;31m' | |
| OK='\033[0;32m' | |
| END='\033[0m' # No Color | |
| declare -a arr=("rsyslogd" "crond" "noelement") | |
| ## now loop through the above array | |
| for i in "${arr[@]}" |
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
| # copy this code to .bashrc | |
| # This loop generates aliases for the hosts you've configured on ./ssh/config. | |
| for x in $(grep '^Host' ~/.ssh/*config 2>/dev/null | grep -v '[?*]' | cut -d ' ' -f 2-); do | |
| alias "$x"="ssh $x" | |
| done |
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
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| tb "gopkg.in/tucnak/telebot.v2" | |
| "io/ioutil" | |
| "log" | |
| "math/rand" | |
| "net" |
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
| function far-scp | |
| if count $argv > /dev/null | |
| echo Connecting through $argv[1] | |
| echo Source: $argv[2] | |
| echo Dest: $argv[3] | |
| scp -oProxyJump=$argv[1] $argv[2] $argv[3] | |
| else | |
| echo " usage: far-scp [proxy-addr] [src] [dst]" | |
| end | |
| end |
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 | |
| # /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses | |
| # Configure every saved WiFi connection in NetworkManager with a spoofed MAC | |
| # address, seeded from the UUID of the connection and the date plus the hour eg: | |
| # 'c31bbcc4-d6ad-11e7-9a5a-e7e1491a7e20-2017-11-20-09' | |
| # This makes your MAC difficult to track across WiFi providers, and | |
| # for one provider to track across days. |