Skip to content

Instantly share code, notes, and snippets.

View will-h's full-sized avatar

Will Hargrave will-h

View GitHub Profile
@will-h
will-h / buttons.py
Created March 31, 2018 18:01
hacky thing to switch chrome tabs based on GPIO on rasppi
#!/usr/bin/python
#!/usr/bin/python
#!/usr/bin/python
import time
import RPi.GPIO as GPIO
from xdo import Xdo
xdo = Xdo(display=":0.0")
GPIO.setmode(GPIO.BCM)
@will-h
will-h / pdb_verify_asn.py
Created June 25, 2015 11:15
pdb_check.py - verify list of ASNs in peeringdb
#!/usr/bin/env python
import json,urllib2
live_asn = set()
f = open('asn-20150625', 'r')
for line in f:
live_asn.add(int(line.strip()))
file_url = urllib2.urlopen("https://beta.peeringdb.com/api/asn")
netlist=json.loads(file_url.read())

Keybase proof

I hereby claim:

  • I am will-h on github.
  • I am willharg (https://keybase.io/willharg) on keybase.
  • I have a public key whose fingerprint is 24D6 31C6 8B85 27CA 3380 057B 0107 7165 1557 DBD2

To claim this, I am signing this object: