Taken from StackExchange
Thanks to LangLangC
For temperature and other improvements see https://gist.github.com/cdleon/d16e7743e6f056fedbebc329333d79df
| -- Thank @sbengo to figure out foreign_keys constraints is defaults to false in sqlite | |
| -- Enable to delete logs by cascading delete | |
| PRAGMA foreign_keys = ON; | |
| WITH n_build_ids_per_repo as ( | |
| SELECT build_id | |
| FROM ( | |
| SELECT | |
| build_id, | |
| build_repo_id, |
| esphome: | |
| name: esp32_1 | |
| platform: ESP32 | |
| board: lolin32 | |
| wifi: | |
| ssid: !secret ssid_iot | |
| password: !secret password_iot | |
| manual_ip: | |
| static_ip: 192.168.0.110 |
Taken from StackExchange
Thanks to LangLangC
For temperature and other improvements see https://gist.github.com/cdleon/d16e7743e6f056fedbebc329333d79df
| version: "3.7" | |
| services: | |
| pihole: | |
| container_name: pihole | |
| image: pihole/pihole:latest | |
| dns: 127.0.0.1 | |
| restart: unless-stopped | |
| links: | |
| - unbound |
Download the latest ugw3 package from https://github.com/Lochnair/vyatta-wireguard/releases and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb.
cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key| # Defaults / Configuration options for homebridge | |
| # The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others) | |
| HOMEBRIDGE_OPTS=-U /var/lib/homebridge | |
| # If you uncomment the following line, homebridge will log more | |
| # You can display this via systemd's journalctl: journalctl -f -u homebridge | |
| # DEBUG=* |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/signal" | |
| "syscall" | |
| ) | |
| func main() { |
Windows is really horrible system for developers and especially for devops. It doesn’t even have a usable terminal and shell, so working with command line is really pain in the ass. If you really don’t want to switch to any usable system (OS X, Linux, BSD…), then this guide should help you to setup somewhat reasonable environment – usable terminal, proper shell, ssh client, git and Sublime Text as a default editor for shell.
| package main | |
| import ( | |
| "log" | |
| "math" | |
| ) | |
| func Round(val float64, roundOn float64, places int ) (newVal float64) { | |
| var round float64 | |
| pow := math.Pow(10, float64(places)) |
| #!/bin/bash | |
| # Sometimes you need to move your existing git repository | |
| # to a new remote repository (/new remote origin). | |
| # Here are a simple and quick steps that does exactly this. | |
| # | |
| # Let's assume we call "old repo" the repository you wish | |
| # to move, and "new repo" the one you wish to move to. | |
| # | |
| ### Step 1. Make sure you have a local copy of all "old repo" | |
| ### branches and tags. |