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
mkdir your /mnt/whatevers | |
put .container's in /etc/containers/systemd/ | |
systemctl daemon-reload | |
systemctl enable --now mosquitto | |
systemctl enable --now esphome | |
systemctl enable --now matter | |
systemctl enable --now hass | |
systemctl enable --now zigbee2mqtt |
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
ls ~/.config/containers/systemd/ | |
peer-es.container peer-mysql.container peer-pdb.container peer.pod |
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
always use &str instead of &String | |
always use &Path instead of &PathBuf | |
always use &[T] instead of &Vec<T> |
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
S (Consistently Good) | |
- Guru the Caterer | |
- Godavri | |
- Ritu Ki Rasoi | |
A (Good) | |
- Dosa And Curry | |
- Himalayan Kitchen |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
## Lights | |
import machine | |
import neopixel | |
np0 = neopixel.NeoPixel(machine.Pin(5), 200) | |
np1 = neopixel.NeoPixel(machine.Pin(19), 200) | |
for i in range(0,200): | |
np0[i] = (101,51, 0) |
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
version: "2" | |
settings: | |
# The deployment_output_path is mounted to the Conductor container, so | |
# that the `run` and `deployment` commands can write generated Ansible | |
# playbooks to it. | |
# deployment_output_path: ~/ansible-deployment | |
# The Conductor container does the heavy lifting, and provides a portable | |
# Python runtime for building your target containers. It should be derived | |
# from the same distribution as you're building your target containers with. | |
conductor_base: centos:7 |
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
from twisted.internet import reactor | |
from twisted.web.server import Site | |
from twisted.web.resource import Resource | |
import json, hmac | |
from hashlib import sha1 | |
from blinker import signal | |
class WebhookServer(Resource): |
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 network | |
sta_if = network.WLAN(network.STA_IF) | |
ap_if = network.WLAN(network.AP_IF) | |
if not sta_if.isconnected(): | |
sta_if.active(True) | |
sta_if.connect('YYY', '') | |
ap_if.active(False) | |
while not sta_if.isconnected(): | |
pass |
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
""" | |
Two things are wrong with Django's default `SECRET_KEY` system: | |
1. It is not random but pseudo-random | |
2. It saves and displays the SECRET_KEY in `settings.py` | |
This snippet | |
1. uses `SystemRandom()` instead to generate a random key | |
2. saves a local `secret.txt` |
NewerOlder