Skip to content

Instantly share code, notes, and snippets.

@derjanb
derjanb / netpps.sh
Created May 2, 2016 07:43 — forked from joemiller/netpps.sh
shell: quick linux scripts for showing network bandwidth or packets-per-second
#!/bin/bash
if [ -z "$1" ]; then
echo
echo usage: $0 network-interface
echo
echo e.g. $0 eth0
echo
echo shows packets-per-second
(() => {
if (typeof GM_info != 'object' || GM_info.scriptHandler != 'Tampermonkey' || GM_info.version != '4.14') return;
const u_getValue = typeof GM_getValue == 'function' ? GM_getValue : undefined;
const d_getValue = typeof GM == 'object' ? GM.getValue : undefined;
if (u_getValue) {
GM_getValue = this.GM_getValue = (...args) => {
const v = u_getValue(...args);
return JSON.parse(JSON.stringify(v));