Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jab416171 on github.
  • I am jab416171 ( on keybase.
  • I have a public key ASCFIZ4hqII3ZUQ2qafX6QyHYw4BocOGTXfrC3yHC46X2Qo

To claim this, I am signing this object:

#!/usr/bin/env python
import gspread
import sys
import json
from oauth2client.service_account import ServiceAccountCredentials
timestamp = sys.argv[1]
ping = sys.argv[2]
up = sys.argv[3]
down = sys.argv[4]
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet netmask 0xff000000
epair3b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 02:54:89:xx:xx:xx
inet netmask 0xff000000 broadcast
#!/usr/bin/env python
import sys
filename = sys.argv[1]
token = sys.argv[2]
def set_contains(set, token):
for item in set:
if token in item:
#! /bin/sh
for i in $(sysctl -n kern.disks | awk '{for (i=NF; i!=0 ; i--) if (match($i, '/da/')) print $i }')
echo $i `smartctl -a /dev/$i | awk '/Temperature_Celsius/{DevTemp=$10;} /Serial Number:/{DevSerNum=$3}; /Device Model:/{DevName=$3} END { print DevTemp,DevSerNum,DevName }'`
#!/usr/bin/env python
import gspread
import sys
import json
from oauth2client.client import SignedJwtAssertionCredentials
timestamp = sys.argv[1]
ping = sys.argv[2]
up = sys.argv[3]
down = sys.argv[4]
def insert_row(self, values, index=1):
""""Adds a row to the worksheet at the specified index and populates it with values.
Widens the worksheet if there are more values than columns.
:param values: List of values for the new row.
data_width = len(values)
if self.col_count < data_width:
sub foo(f)
a,b == 1,1
for i in range(f-1):
a,b = b,a+b
return str(a)
def bar(f:
if f=1 or f=2:
result=$(speedtest --simple)
download=$(echo $result | grep -oP "(?<=Download: )[0-9\.]* .*?/s")
upload=$(echo $result | grep -oP "(?<=Upload: )[0-9\.]* .*?/s")
ping=$(echo $result | grep -oP "(?<=Ping: )[0-9\.]* .*?ms")
if [ ! -e $filename ]; then
echo "\"Date\",\"Upload\",\"Download\",\"Ping\"" > $filename
echo "\"$(date)\",\"$upload\",\"$download\",\"$ping\"" >> $filename
$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 63933
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8