This file contains 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
#!/bin/bash | |
for c in $(lxc list --project=snapcraft | awk '{print $2}' | grep ^snapcraft- | grep -v snapcraft-dev); do | |
echo "Force delete $c" | |
lxc delete --project=snapcraft $c --force | |
done |
This file contains 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
#!/bin/bash -e | |
SERVER_CERT_FILE=server.cert | |
SERVER_KEY_FILE=server.key | |
SERVER_CSR_FILE=server.csr | |
CA_CERT_FILE=ca.cert | |
CA_KEY_FILE=ca.key | |
# Generate the Certificate Authority (CA) Private Key | |
openssl ecparam -name prime256v1 -genkey -noout -out $CA_KEY_FILE |
This file contains 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 chip.server import ( | |
GetLibraryHandle, | |
PostAttributeChangeCallback, | |
) | |
CLUSTER_ONOFF = 6 | |
ATTR_ONOFF = 0 | |
@PostAttributeChangeCallback |
[This guide][intel-nuc] describes how to install Ubuntu Core on Intel NUC using two USB flash drives.
Here are a few alternative options to remove the reliance on a second USB flash drive:
This is self explained. Boot into the live Ubuntu and download the image. Flash it according to the [official instructions][intel-nuc].
This is not always practical:
- We may need to reuse that image without downloading it every time
- We may need to use a custom-built image that isn't available online
The Ubuntu Core installation fails if one of the required seeded snaps fail to start.
When a required snap fails, the system starts shutting down, snapd
stops, and we end up with the following strange error:
cannot obtain system details: cannot communicate with server: Get http://localhost/v2/system-info: dial unix /run/snapd.socket: connect: connection refused
or
/usr/share/subiquity/console-conf-wrapper: line 32: snap: command not found
This file contains 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
# Original script from https://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging/python-setup | |
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries | |
# SPDX-License-Identifier: MIT | |
# RUN: | |
# BROKER=localhost python read.py | |
import time | |
import board |
This file contains 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
# Original script from https://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging/python-setup | |
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries | |
# SPDX-License-Identifier: MIT | |
# RUN: | |
# REST_SERVER=http://myserver:59986 python3 read.py | |
import time | |
import board |
NewerOlder