Skip to content

Instantly share code, notes, and snippets.

View strpc's full-sized avatar

strpc

  • 127.0.0.1
View GitHub Profile
@iamwildtuna
iamwildtuna / gist:7772b7c84a11bf6e1385f23096a73a15
Last active October 13, 2025 14:53
VPN IP Addresses (IP адреса ChatGPT, Copilot, Meta, Facebook, Instagram, YouTube, Medium, X ex. Twitter, Discord)
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
@nkhitrov
nkhitrov / structlog_fastapi.py
Created March 16, 2023 00:04
Structlog FastAPI example
"""
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
package main
import "fmt"
// Builder
type Computer struct {
CPU string
RAM int
MB string
@jasonmadigan
jasonmadigan / water_leak_action_blueprint.yaml
Last active November 19, 2024 15:38
HASS Water Leak Alert Blueprint
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
@cristaloleg
cristaloleg / golangci.yaml
Last active July 31, 2025 16:03
An opinionated golangci-lint config (right version™)
# $ golangci-lint run --config=~/.golangci.yml ./... > lint.txt
version: "2"
linters:
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- canonicalheader
@Kuzyashin
Kuzyashin / library.md
Created September 15, 2021 13:41 — forked from Rheola/library.md
Материалы по Go (golang)
@sbyx
sbyx / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active September 27, 2025 19:41
Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
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').
@Dids
Dids / Compile_Go_for_Apple_Silicon_M1.md
Last active January 7, 2025 03:19
Compile Go for Apple Silicon (M1)

NOTICE: This guide is no longer relevant, as a lot has changed over time and Go supports Apple Silicon natively just fine now!

Compile Go for Apple Silicon (M1)

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.

@triangletodd
triangletodd / README.md
Last active September 11, 2025 14:20
k3s in LXC on Proxmox

On the host

Ensure these modules are loaded

cat /proc/sys/net/bridge/bridge-nf-call-iptables

Disable swap

sysctl vm.swappiness=0
swapoff -a
@bst27
bst27 / gitea-backup.sh
Created August 18, 2020 07:15
A Gitea backup script for Docker: It creates a .zip backup of Gitea running inside Docker and moves the backup file to the current working directory.
#!/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