Skip to content

Instantly share code, notes, and snippets.

View renatoruis's full-sized avatar
✌️
Good Vibes

Renato Ruis renatoruis

✌️
Good Vibes
View GitHub Profile
@renatoruis
renatoruis / diff-dns.py
Created March 27, 2025 12:06
sync-dns-cloudflate-to-AD
import subprocess
import requests
import json
from typing import List, Dict
# Config Active Directory
IP_AD = "192.168.X.X" # IP do Active Directory
AD_USER = "domain\\user" # Usuário do Active Directory
AD_PASSWORD = "password" # Senha do Active Directory
DOMAIN = "domain.com.br" # Domínio do Active Directory
upstream fastcgi_backend {
server unix:/run/php/php7.4-fpm.sock;
}
server {
server_name _;
listen 8080;
set $MAGE_ROOT /nfs/magento;
set $MAGE_MODE production; # or production
server {
listen 80;
server_name _;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
keepalive_timeout 300s;
add_header Strict-Transport-Security "max-age=63072000" always;
# VCL version 5.0 is not supported so it should be 4.0 even though actually used Varnish version is 6
vcl 4.0;
import std;
# The minimal Varnish version is 6.0
# For SSL offloading, pass the following header in your proxy server or load balancer: 'X-Forwarded-Proto: https'
backend default {
.host = "magento-local";
.port = "8080";
#!/bin/bash
apt update
apt install rsyslog -y
sleep 1
echo "*.* @@10.29.101.9:514" >> /etc/rsyslog.conf
sleep 1
cat <<EOF > /etc/rsyslog.d/10-docker.conf
#!/bin/bash
apt update
apt install rsyslog -y
sleep 1
echo "*.* @@172.31.102.16:514" >> /etc/rsyslog.conf
sleep 1
cat <<EOF > /etc/rsyslog.d/10-docker.conf
@renatoruis
renatoruis / fluent-bit.conf
Last active November 9, 2021 15:40
fluent-bit.conf
[SERVICE]
flush 5
daemon Off
log_level info
http_server On
http_listen 0.0.0.0
http_port 2020
Parsers_File parsers.conf
storage.metrics off
#!/bin/bash
for i in G M
do
du -ah | grep [0-9]$i | sort -nr -k 1
done | head -n 11
@renatoruis
renatoruis / rbac.yaml
Created March 22, 2019 16:22
Traefik
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: traefik-ingress-controller
rules:
- apiGroups:
- ""
resources:
- services