Skip to content

Instantly share code, notes, and snippets.

View sokovnich's full-sized avatar
🎯
Focusing

Yan sokovnich

🎯
Focusing
View GitHub Profile
@probonopd
probonopd / orangepizero.md
Last active March 25, 2025 23:20
Orange Pi Zero

Orange Pi Zero

Ideas

  • Port HomeServer to it
  • Read-only thanks to overlayroot
  • Native serial for Viessmann w/o USB-to-Serial
  • Native 433 MHz sending w/o Arduino
  • Native Audio output w/o USB dongle; can attach small amp board
  • Webcam via USB with motion
stack@octavia:~$ cat /etc/octavia/octavia.conf |egrep -v "^$|^#"
[DEFAULT]
transport_url = rabbit://stackrabbit:[email protected]:5672/
api_handler = queue_producer
bind_host = 172.16.68.59
logging_exception_prefix = ERROR %(name)s %(instance)s
logging_default_format_string = %(color)s%(levelname)s %(name)s [-%(color)s] %(instance)s%(color)s%(message)s
logging_context_format_string = %(color)s%(levelname)s %(name)s [%(global_request_id)s %(request_id)s %(project_name)s %(user_name)s%(color)s] %(instance)s%(color)s%(message)s
logging_debug_format_suffix = {{(pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d}}
[api_settings]
@andriisoldatenko
andriisoldatenko / fopen.py
Last active November 20, 2018 05:42
This function helps you do not see errors during upload solutions, because you forget to switch back to sys.stdin and also you can easily debug your code with ipdb or another python debuggers
def fopen(filename, default=sys.stdin):
"""
This function helps you do not see errors during upload solutions
because you forget to switch back to sys.stdin and also you can easily
debug your code with ipdb or another python debuggers
"""
try:
f = open(filename)
except FileNotFoundError:
f = default