Let's say you want to host domains first.com
and second.com
.
Create folders for their files:
Reference - https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/
sudo apt-get install libgtest-dev
sudo apt-get install cmake # install cmake
cd /usr/src/gtest
sudo cmake CMakeLists.txt
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
/* | |
Application: | |
- Interface water flow sensor with ESP32 board. | |
Board: | |
- ESP32 Dev Module | |
https://my.cytron.io/p-node32-lite-wifi-and-bluetooth-development-kit | |
Sensor: | |
- G 1/2 Water Flow Sensor |
Getting data produced by IoT sensors into a database is practically a mandatory step before effective visualisation (eg dashboards).
This recipe shows you how to get an MQTT payload into an InfluxDB database using three Node-RED nodes. It makes the following assumptions:
git clone git@github.com:Robertof/nixos-docker-sd-image-builder.git
cd nixos-docker-sd-image-builder
/config/rpi4/default.nix
to increase size of boot partition
sdImage.firmwareSize = 1024;
/config/sd-image.nix
./rpi3
becomes ./rpi4
In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).
The key component we need to install is tigervnc-standalone-server
.
For this setup, I will use Ubuntu 20.04 LTS (Focal Fossa, unfortunately 22.04 does not work), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the Sample screenshots section for examples.
So let's go. First, we need a working WSL2 installation.
import android.annotation.SuppressLint | |
import androidx.compose.animation.core.animateDpAsState | |
import androidx.compose.animation.core.animateFloatAsState | |
import androidx.compose.foundation.Canvas | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.gestures.awaitFirstDown | |
import androidx.compose.foundation.gestures.forEachGesture | |
import androidx.compose.foundation.gestures.horizontalDrag | |
import androidx.compose.foundation.layout.Arrangement.spacedBy | |
import androidx.compose.foundation.layout.Box |
TIMED_OUT="HostedRendezvous: Rendezvous lookup failed: Hosted Bootstrap error: Network failure: Timed out fetching resource" | |
# sample response variable | |
# RESP="Jun 23 17:49:07 pi-desktop vncserver-x11[915]: HostedRendezvous: Rendezvous lookup failed: Hosted Bootstrap error: Network failure: Timed out fetching resource" | |
RESP=$(service vncserver-x11-serviced status) | |
if [[ "$RESP" =~ "$TIMED_OUT" ]]; then | |
echo "Network Failure, commencing reboot" | |
$(reboot) |