Skip to content

Instantly share code, notes, and snippets.

View rooty's full-sized avatar
🏠
Working from home

Vitalii Mikhnevych rooty

🏠
Working from home
View GitHub Profile
@rooty
rooty / action.yaml
Created February 26, 2026 17:53
Notify on Slack in GitHub Actions
- name: Slack Notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
postgres:
image: 'postgres:16.0'
environment:
POSTGRES_DB: dbhost
POSTGRES_USER: user
POSTGRES_PASSWORD: password
deploy:
placement:
constraints:
- node.role == manager
@rooty
rooty / config.json
Last active January 28, 2026 16:18
php fpm check script (port and socket version )
{
"host": "/run/php/php8.2-fpm.sock",
"port": 0,
"path": "/php82-www",
"interval": 10,
"failcount": 3,
"treshold": 5,
"restart_command": "systemctl restart php8.2-fpm.service",
"holdoff": 30,
"timeout": 5,
@rooty
rooty / update_aws_nova_blocklist.sh
Created May 27, 2025 11:40
Update AWS Nova ip poll
#!/bin/bash
# Тимчасовий файл
TMP_FILE="/tmp/aws_ca_central_1_ips.txt"
NGINX_BLOCK_FILE="/etc/nginx/aws-nova-deny.conf"
# Завантажити актуальний список IP
curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | \
jq -r '.prefixes[] | select(.region=="ca-central-1") | "deny \(.ip_prefix);"' > "$TMP_FILE"
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAhuiKfA6RhdGvW4frqrUgwHy0sSGP+a2kFQHi5vuhGQ
@rooty
rooty / ban-ip.txt
Last active September 12, 2024 10:10
bad ip for Nginx
146.70.178.254/32
91.199.118.51/32
91.199.118.51/32
146.70.178.164/32
149.88.106.153/32
146.70.178.164/32
216.24.216.217/32
20.37.101.39/32
172.207.171.136/32
194.233.73.44/32
@rooty
rooty / .ebextensions\https-instance-securitygroup.config
Created September 5, 2021 21:48 — forked from Guneetgstar/.ebextensions\https-instance-securitygroup.config
Amazon Elastic Beanstalk with SSL (HTTPS) without a Load Balancer on Single Instanced EC2 Amazon Linux 2 Image (Java)
######
## See https://github.com/awsdocs/elastic-beanstalk-samples/tree/main/configuration-files/aws-provided/security-configuration for refrence.
# .ebextensions/https-instance-securitygroup.config
Resources:
sslSecurityGroupIngress:
Type: AWS::EC2::SecurityGroupIngress
Properties:
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
IpProtocol: tcp
ToPort: 443
Source code for article http://ifdattic.com/integrating-datadog-and-logstash-on-aws-ec2/
The first line provides the full file path, remove it from real files!
@rooty
rooty / docker-compose.yml
Created December 6, 2020 00:59 — forked from mTrax-/docker-compose.yml
Traefik v2 with ssl
version: "3.3"
services:
reverse-proxy:
image: traefik:latest
restart: unless-stopped
command:
- --api
- --providers.docker=true
- --entrypoints.web.address=:80
@rooty
rooty / jail.conf
Created June 16, 2020 11:33 — forked from AysadKozanoglu/jail.conf
fail2ban nginx 404 400 403 444 filter /etc/fail2ban/filter.d/nginx-4xx.conf enable
# to enable this filter add to jail.conf following (/etc/fail2ban/jail.conf)
# Thanks to -> TheBarret
[nginx-4xx]
enabled = true
port = http,https
logpath = /var/log/nginx/access.log
maxretry = 3