- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"acap": 674, | |
"afp": 548, | |
"dict": 2628, | |
"dns": 53, | |
"file": null, | |
"ftp": 21, | |
"git": 9418, | |
"gopher": 70, | |
"http": 80, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<domain type='kvm' id='1'> | |
<name>Win8-HTPC-OVMF</name> | |
<uuid>a2c7ea78-f49a-ef5b-6b16-521d098d40c9</uuid> | |
<metadata> | |
<vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/> | |
</metadata> | |
<memory unit='KiB'>8388608</memory> | |
<currentMemory unit='KiB'>8388608</currentMemory> | |
<memoryBacking> | |
<nosharepages/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Useful celery config. | |
app = Celery('tasks', | |
broker='redis://localhost:6379', | |
backend='redis://localhost:6379') | |
app.conf.update( | |
CELERY_TASK_RESULT_EXPIRES=3600, | |
CELERY_QUEUES=( | |
Queue('default', routing_key='tasks.#'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
requirements_file = 'base.pip' | |
requirements = open(requirements_file, 'r') | |
content = requirements.read().splitlines() | |
content = list(set(content)) | |
content.sort(key=lambda y: y.lower()) | |
content = '\n'.join(content) | |
file = open('sorted_'+requirements_file, 'w') | |
file.write(content) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# MIT License | |
# Copyright (c) 2023 Ivan Koblik | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import msvcrt | |
import time | |
def raw_input_with_timeout(prompt, timeout=30.0): | |
finishat = time.time() + timeout | |
result = [] | |
while True: | |
if msvcrt.kbhit(): | |
result.append(msvcrt.getche()) | |
if result[-1] == '\r': # or \n, whatever Win returns;-) |
by Asim Jalis, MetaProse.com
An interactive shell is useful for quickly trying out different commands. While Ruby, Python, and Clojure come with interactive shells, Perl does not. However, it is easy to create one using this one-liner on Unix systems:
perl -e 'do{print("perl> ");$_x=<>;chomp $_x;print(eval($_x)."\n")}while($_x ne "q")'
NewerOlder