Skip to content

Instantly share code, notes, and snippets.

Avatar
🦏
Focusing

Jérôme Hugon spoutnik16

🦏
Focusing
View GitHub Profile
@spoutnik16
spoutnik16 / artnet_middleware.py
Created Jun 26, 2020 — forked from alarrosa14/artnet_middleware.py
A Python ArtNet packet receiver that broadcasts its payload.
View artnet_middleware.py
import sys
from socket import (socket, AF_INET, SOCK_DGRAM, SOL_SOCKET, SO_REUSEADDR,
SO_BROADCAST)
from struct import pack, unpack
UDP_IP = "127.0.0.1"
UDP_PORT = 6454
@spoutnik16
spoutnik16 / pi_mount_usb.md
Last active Aug 7, 2018 — forked from etes/pi_mount_usb.md
How to setup mount / auto-mount USB Hard Drive on Raspberry Pi
View pi_mount_usb.md

How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

Follow the simple steps in the order mentioned below to have your USB drive mounted on your Raspberry Pi every time you boot it.

These steps are required especially if your are setting up a Samba share, or a 24x7 torrent downloader, or alike where your Raspberry Pi must have your external storage already mounted and ready for access by the services / daemons.

Step 0. Plug in your USB HDD / Drive to Raspberry Pi If you are using a NTFS formatted drive, install the following

@spoutnik16
spoutnik16 / foo.py
Last active Jun 9, 2019 — forked from cdunklau/foo.py
ESCPOS printer driver
View foo.py
class Printer():
"""
Print thing with my ESCPOS printer
"""
def text(self, text):
with open('/dev/usb/lp0', 'wb') as lp0:
lp0.write(text.encode('cp437'))
lp0.write(b'\n')
def command(self, command):
with open('/dev/usb/lp0', 'wb') as lp0:
You can’t perform that action at this time.