Skip to content

Instantly share code, notes, and snippets.

View 0x00dec0de's full-sized avatar

Sukhorukov Olexandr 0x00dec0de

View GitHub Profile
# Source: https://gist.github.com/vfarcic/8301efb15748af1da3e376b7132e519e
###################################################################
# Should We Run Databases In Kubernetes? CloudNativePG PostgreSQL #
# https://youtu.be/Ny9RxM6H6Hg #
###################################################################
# Additional Info:
# - CloudNativePG: https://cloudnative-pg.io
# - EDB: https://enterprisedb.com
@0x00dec0de
0x00dec0de / zimbra-backup-emails.sh
Created January 12, 2024 16:59 — forked from filippo/zimbra-backup-emails.sh
How to backup and restore emails of a specific account on zimbra
# The command below creates a tgz file with all emails for user@domain.com in .eml format:
# execute as root
/opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL "//?fmt=tgz" > /tmp/account.tgz
# You can do the same via a REST URL:
wget http://ZIMBRA.SERVER/home/user@domain.com/?fmt=tgz
# to restore email:
/opt/zimbra/bin/zmmailbox -z -m user@domain.com postRestURL "//?fmt=tgz&resolve=reset" /tmp/account.tgz
@0x00dec0de
0x00dec0de / tunnel.go
Created November 24, 2023 18:59 — forked from felix021/tunnel.go
A fast secure tunnel written in Golang
package main
import (
"crypto/md5"
"crypto/rand"
"errors"
"flag"
"fmt"
"io"
"net"
@0x00dec0de
0x00dec0de / gist:1eb2bf8ced5f37be449c2e67cbc07d7f
Created October 16, 2023 12:28 — forked from riverans/gist:3b61ed80ef6cd74a6af944b771eb39bf
Exim DMARC with configuration to send DMARC reports (but not forensic reports)
1) Exim config
a. Global settings:
dmarc_history_file = /var/spool/exim/dmarc_history.txt
dmarc_tld_file = /etc/exim/opendmarc.tlds
b. Get the tld file (list of valid TLD's) from http://publicsuffix.org/list/
c. Somewhere early in the RCPT ACL I have:
.include_if_exists /etc/exim/dmarc_acl_control.conf
@0x00dec0de
0x00dec0de / create-user.sh
Created May 21, 2023 14:36 — forked from etiennetremel/create-user.sh
Create Kubernetes user using kubectl csr and cfssl
#!/bin/bash
#
# Create Kubernetes user. Require cfssl.
#
# Usage:
# ./create-user.sh <kubernetes api host> <fulle name> <clusterrole>
#
# Example:
# ./create-user.sh k8s-api.my-domain.com "Jane Doe" my-project:admin
@0x00dec0de
0x00dec0de / 100_base.conf
Created April 21, 2023 12:48 — forked from danackerson/100_base.conf
using nginx + lua + redis for redirects and rewrites
# using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty
# more info @ http://wiki.nginx.org/HttpLuaModule#access_by_lua
http {
lua_package_path "/etc/nginx/include.d/?.lua;;";
lua_socket_pool_size 100;
lua_socket_connect_timeout 10ms;
lua_socket_read_timeout 10ms;
server {
@0x00dec0de
0x00dec0de / tts.py
Created February 25, 2023 17:46 — forked from sainak/tts.py
tts using google gstatic dictionary
#!/usr/bin/env python3
# ./tts.py hello world
import requests, string, os
from playsound import playsound
from sys import argv
text = (
" ".join(argv[1:]).lower().translate(str.maketrans("", "", string.punctuation)).split(" ")
)
@0x00dec0de
0x00dec0de / maintenance-page.yaml
Created February 15, 2023 20:15 — forked from sidpalas/maintenance-page.yaml
Kubernetes temporary maintenance page
apiVersion: v1
kind: ConfigMap
metadata:
name: maintenance-page
data:
maintenance.html: |-
<!--HTML GOES HERE-->
<!doctype html>
<title>Site Maintenance</title>
<link rel="stylesheet" href="maintenance.css">
@0x00dec0de
0x00dec0de / _README.md
Created February 1, 2023 12:03 — forked from lord-alfred/_README.md
Y-Factors Formula

Y-Factors Formula

Здесь опубликованы коэффициенты для одного из внутренних ранжировщиков в поиске Яндекса. Это не итоговая формула, которая влияет на результат появления ссылки в серпе, т.к. судя по изученному коду – внутри используется несколько ранжировщиков и поисковых движков, результаты которых мержатся между собой и уже итоговый результат приводит к распределению ссылок по топу выдачи.

коэффициенты влияния на факторы

| Коэффициент | Название Фактора | Описание Фактора |

@0x00dec0de
0x00dec0de / gist:0ed5d6a44ab7effcea9a2d863ca53d2d
Created November 16, 2022 14:01 — forked from RichiH/gist:f2ffb824d428d8ca0c7c40cd62022b56
Prometheus relabelling to get rid of port number
============================================
============================================
============================================
This does what it should:
regex: (.+?)(:80)?
Also see https://golang.org/pkg/regexp/syntax/