This file contains 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
brennondenny.vsc-jetbrains-icons-enhanced | |
github.copilot | |
github.copilot-chat | |
isudox.vscode-jetbrains-keybindings | |
josemurilloc.aura-spirit-dracula | |
ms-vscode-remote.remote-wsl | |
ms-vscode.makefile-tools | |
pkief.material-icon-theme | |
rlivings39.fzf-quick-open | |
subframe7536.custom-ui-style |
This file contains 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
version: '2' | |
services: | |
pg-1: | |
container_name: pg-1 | |
image: bitnami/postgresql-repmgr:14 | |
restart: always | |
ports: | |
- 5432 | |
volumes: |
This file contains 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
# Running Home Assistant in docker with one command | |
Originally produced by hass scripts: | |
``` | |
docker container create --name hassio_supervisor --privileged --security-opt apparmor=hassio-supervisor \ | |
-v /run/docker.sock:/run/docker.sock:rw \ | |
-v /run/containerd/containerd.sock:/run/containerd/containerd.sock:rw \ | |
-v /run/systemd-journal-gatewayd.sock:/run/systemd-journal-gatewayd.sock:rw \ | |
-v /run/dbus:/run/dbus:ro \ |
This file contains 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
## Used when you manage applications in the same cluster where Argo CD runs | |
createClusterRoles: true | |
## Custom resource configuration | |
crds: | |
install: true | |
keep: false | |
## Globally shared configuration | |
global: |
This file contains 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
KafkaExporter: | |
METRIC_PATH: 'kafka_metrics' | |
INTERVAL: 15 | |
BACKOFF: 10 | |
CONFIG: | |
brokers: | |
- '10.5.50.77:29193' | |
certificates: | |
ssl_ca_location: 'certs/ca-cert.pem' # Path to your CA certificate |
This file contains 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
| Parameter | Description | Default Value | Recommended Value | | |
|----------------------------------|-----------------------------------------------------------------------------|---------------|-------------------| | |
| `vm.swappiness` | Controls swap space usage. | 60 | 1 | | |
| `vm.dirty_background_ratio` | Percentage of system memory filled with dirty pages before flushing starts. | 10 | 5 | | |
| `vm.dirty_ratio` | Maximum percentage of dirty pages before forced flushing. | 20 | 60 | | |
| `vm.dirty_expire_centisecs` | Time after which dirty pages are eligible for write-out. | 3000 | 2000 | | |
| `vm.dirty_writeback_centisecs` | Time between periodic write-out of dirty pages. | 500 |
This file contains 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
# Ensure IP forwarding is enabled | |
echo 1 > /proc/sys/net/ipv4/ip_forward | |
# Insert PREROUTING rule at the top of the chain | |
iptables -t nat -I PREROUTING 1 -p tcp -d A_IP --dport 8082 -j DNAT --to-destination B_IP:8082 | |
# Insert POSTROUTING rule at the top of the chain | |
iptables -t nat -I POSTROUTING 1 -p tcp -d B_IP --dport 8082 -j MASQUERADE | |
# Ensure FORWARD chain allows traffic |
This file contains 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
{ | |
"__inputs": [ | |
{ | |
"name": "DS_VICTORIA", | |
"label": "victoria", | |
"description": "", | |
"type": "datasource", | |
"pluginId": "prometheus", | |
"pluginName": "Prometheus" | |
} |
This file contains 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
import re, json | |
import re | |
def jq(json_data, path, value=None, remove=False): | |
""" | |
Find JSON nodes matching the given path in jq-like syntax and update them with value. | |
Args: |
This file contains 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
import os | |
from prometheus_api_client import PrometheusConnect, PrometheusApiClientException | |
import csv | |
import datetime | |
import re | |
def sanitize_filename(filename): | |
# Replace characters not allowed in filenames with underscore | |
return re.sub(r'[^\w\.]', '_', filename) |
NewerOlder