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
Meta (Instagram, Facebook) | |
// Узлы | |
157.240.253.174, 157.240.253.172, 157.240.253.167, 157.240.253.63, 157.240.253.32 | |
157.240.252.174, 157.240.252.172, 157.240.252.167, 157.240.252.63, 157.240.252.38 | |
57.144.112.34, 57.144.110.1, 157.240.205.174, 87.245.223.97 | |
// Подсети | |
213.102.128.0/24 | |
204.15.20.0/22 | |
199.201.0.0/16 |
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
""" | |
Structlog example configuration with FastAPI. | |
Features: | |
- async bound logger | |
- contextvars to log request-id and other meta data | |
- custom format for default logging loggers and structlog loggers | |
""" | |
import asyncio | |
import logging |
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
package main | |
import "fmt" | |
// Builder | |
type Computer struct { | |
CPU string | |
RAM int | |
MB string |
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
blueprint: | |
name: Moisture Sensor | |
description: Perform action when moisture sensor turns wet | |
domain: automation | |
input: | |
actions: | |
name: Actions | |
description: | |
Notifications or similar to be run. {{ trigger.event.data.new_state.attributes.friendly_name | |
}} will be the name of the sensor |
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
# $ golangci-lint run --config=~/.golangci.yml ./... > lint.txt | |
version: "2" | |
linters: | |
enable: | |
- asasalint | |
- asciicheck | |
- bidichk | |
- bodyclose | |
- canonicalheader |
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
blueprint: | |
name: Low battery level detection & notification for all battery sensors | |
description: Regularly test all sensors with 'battery' device-class for crossing | |
a certain battery level threshold and if so execute an action. | |
domain: automation | |
input: | |
threshold: | |
name: Battery warning level threshold | |
description: Battery sensors below threshold are assumed to be low-battery (as | |
well as binary battery sensors with value 'on'). |
NOTICE: This guide is no longer relevant, as a lot has changed over time and Go supports Apple Silicon natively just fine now!
Follow these short instructions on how to compile Go for Apple Silicon (M1). From here on out, we may simply refer to it as the "ARM device".
This entire process should only take about 5-10 minutes, but please read through everything carefully, in order to avoid any potential issues along the way.
Note that at the time of writing this, Go was not yet officially available for Apple's ARM.
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
#!/bin/bash | |
# This script creates a .zip backup of gitea running inside docker and copies the backup file to the current working directory | |
echo "Creating gitea backup inside docker containter ..." | |
docker exec -u git -it -w /tmp $(docker ps -qf "name=gitea_server_1") bash -c '/app/gitea/gitea dump -c /data/gitea/conf/app.ini --file /tmp/gitea-dump.zip' | |
echo "Copying backup file from the container to the host machine ..." | |
docker cp $(docker ps -qf "name=gitea_server_1"):/tmp/gitea-dump.zip /tmp |
NewerOlder