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
#!/usr/bin/env bash | |
# Usage: | |
# knockd_script.sh start <IP> | |
# knockd_script.sh stop <IP> | |
# knockd_script.sh reset <IP> | |
# knockd_script.sh clean | |
PORT=2222 | |
CHAIN="INPUT" | |
STATE_DIR="/var/lib/knockd/state" |
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
import re | |
pattern = r".*\s+Time:\s+(.*)\s+.*\s+.*Query_time:\s+(\d+\.\d+)\s+Lock_time:\s+(\d+\.\d+)\s+Rows_sent:\s+(\d+)\s+Rows_examined:\s+(\d+)\n((.|\n|)*)" | |
def parse_block(data): | |
matches = re.findall(pattern, data) | |
return matches | |
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
# Load default configuration | |
-include .env.example | |
DOCKER_CMD := docker | |
DOCKER_COMPOSE_FILE := compose.yml | |
DOCKER_COMPOSE_CMD := $(DOCKER_CMD) compose -f $(DOCKER_COMPOSE_FILE) | |
# Override with custom configuration | |
-include .env |
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
# Configuration for collecting logs from each container as seperate file | |
# Additional docker-compose configuration: | |
# logging: | |
# driver: 'syslog' | |
# options: | |
# syslog-address: 'udp://127.0.0.1:5514' | |
# tag: '[custom PROGRAM name]' | |
@version: 3.35 | |
@include "scl.conf" |
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 | |
openssl rand -hex 128 > /etc/zabbix/agent.psk.key && \ | |
chown root:zabbix /etc/zabbix/agent.psk.key && \ | |
chmod 640 /etc/zabbix/agent.psk.key |
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
#* CONSTANTS | |
BAK_DIR = /var/backups/app | |
SRC_DIR = $(shell pwd) | |
#* | |
#* FILES BACKUP | |
#* | |
backup: rotate_files | |
tar --warning=no-file-changed -czf $(BAK_DIR)/$(shell date +"%s").application.tgz -C $(SRC_DIR) . >/dev/null 2>&1 |
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
version: '3' | |
volumes: | |
config: {} | |
networks: | |
inet: | |
name: inet | |
services: |
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
# Import key | |
gpg --import privatekey.gpg.asc | |
# List secert keys | |
gpg --list-secret-keys --keyid-format=long | |
# Edit trust level | |
gpg --edit-key <key-id> | |
gpg> trust |
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
version: '3' | |
networks: | |
traefik-proxy: | |
name: mysql-pma-traefik-proxy | |
ipam: | |
config: | |
- subnet: 10.225.0.0/24 | |
gateway: 10.225.0.1 |
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
POSTGRES_HOST=10.1.0.10 | |
POSTGRES_PORT=5432 | |
POSTGRES_USER=appuser | |
POSTGRES_PASSWORD=Password123! | |
POSTGRES_DB=app | |
TZ=Europe/Warsaw |
NewerOlder