This procedure was tested on FreeBSD-CURRENT build from d8819d88af52.
- Enable linuxulator and install linux userland:
# sysrc linux_enable="YES" # service linux start # pkg install linux_base-c7
This procedure was tested on FreeBSD-CURRENT build from d8819d88af52.
# sysrc linux_enable="YES"
# service linux start
# pkg install linux_base-c7
| from __future__ import with_statement | |
| from kombu import BrokerConnection | |
| from collections import defaultdict | |
| import gevent | |
| from gevent import monkey | |
| monkey.patch_all() | |
| class WorkerHub(): | |
| """ | |
| WorkerHub controls the local mailboxes that the @worker decorator assigns. |
| from django.db.models import Field | |
| from django.conf import settings | |
| from django.utils.decorators import cached_property | |
| class VirtualField(object): | |
| """ | |
| A virtual field, mainly used for caching and seamless computed field retrieval. | |
| This acts both like a (cached) property and a virtual field if supported. | |
| """ |
Researched by Robert Quattlebaum darco@deepdarc.com.
Last updated 2020-02-03.
| # MQTT broker configuration | |
| mqtt: | |
| broker: !secret mqtt_broker | |
| username: !secret mqtt_username | |
| password: !secret mqtt_password | |
| discovery: False # Only if you use the HA API usually | |
| id: mqtt_client | |
| # Define the room for this ESP32 node | |
| substitutions: |
| blueprint: | |
| name: Update notifications | |
| description: Send notifications for new updates and install or skip on action | |
| homeassistant: | |
| min_version: '2022.4.0' | |
| domain: automation | |
| input: | |
| update_entities: | |
| name: Update entities | |
| description: >- |
Services declared as oneshot are expected to take some action and exit immediatelly (thus, they are not really services,
no running processes remain). A common pattern for these type of service is to be defined by a setup and a teardown action.
Let's create a example foo service that when started creates a file, and when stopped it deletes it.
Create executable file /opt/foo/setup-foo.sh:
| #!/usr/bin/python3 | |
| # -*- coding: utf-8 -*- | |
| # Copyright (c) Rau Systemberatung GmbH (rausys.de) | |
| # MIT License | |
| # credits: https://pyimagesearch.com/start-here/ | |
| import argparse | |
| import os | |
| from datetime import datetime, timedelta |
| defmodule MasterProxy.Application do | |
| alias MyApp.Endpoint, as: MyAppEndpoint | |
| alias MyApp.UserSocket, as: MyAppUserSocket | |
| alias MyOtherApp.Endpoint, as: MyOtherAppEndpoint | |
| alias MyOtherApp.UserSocket, as: MyOtherAppUserSocket | |
| alias Phoenix.LiveReloader.Socket, as: LiveReloadSocket | |
| alias Plug.Cowboy | |
| defmodule DateTimeParser do | |
| @mapping %{ | |
| "H" => "(?<hour>\\d{2})", | |
| "I" => "(?<hour12>\\d{2})", | |
| "M" => "(?<minute>\\d{2})", | |
| "S" => "(?<second>\\d{2})", | |
| "d" => "(?<day>\\d{2})", | |
| "m" => "(?<month>\\d{2})", | |
| "y" => "(?<year2>\\d{2})", | |
| "Y" => "(?<year>-?\\d{4})", |