Skip to content

Instantly share code, notes, and snippets.

View parthpower's full-sized avatar
:shipit:

Parth Parikh parthpower

:shipit:
View GitHub Profile
@parthpower
parthpower / watchsync.sh
Last active March 8, 2023 23:09 — forked from leomao/watchsync.sh
Watch file changes and sync two directories (to remote via ssh)
#!/bin/bash
#
# Sync local directory to remote directory.
#
# Modified by: Leo Mao
# Modified from: https://gist.github.com/evgenius/6019316
#
# Requires Linux, bash, inotifywait and rsync.
#
# To avoid executing the command multiple times when a sequence of
@parthpower
parthpower / rate.sh
Last active August 26, 2021 11:19
get rate from netdev stats
#!/bin/sh
if [ $# -lt 1 ]; then
echo "Usage: $0 <ifname> [delay (s) default=10s]";
exit 1;
fi
eth=$1
if [ "x$2" -eq "x" ]; then
delay=10
else