Skip to content

Instantly share code, notes, and snippets.

Avatar

David Honess davidhoness

View GitHub Profile
View usb_share.py
#!/usr/bin/python3
import time
import os
from watchdog.observers import Observer
from watchdog.events import *
CMD_MOUNT = "modprobe g_mass_storage file=/piusb.bin stall=0 ro=1"
CMD_UNMOUNT = "modprobe -r g_mass_storage"
CMD_SYNC = "sync"
View tt_qr.py
#!/usr/bin/python
from PIL import Image
import struct
import qrcode
import sys
if len(sys.argv) == 4:
qr_data = sys.argv[1]
output_file = sys.argv[2]
page_no = sys.argv[3]