Skip to content

Instantly share code, notes, and snippets.

View 0x00dec0de's full-sized avatar

Sukhorukov Olexandr 0x00dec0de

View GitHub Profile
@0x00dec0de
0x00dec0de / runes.py
Created March 26, 2025 14:15 — forked from huw/runes.py
import string
def find_position(char):
for set_num in range(len(table)):
if char in table[set_num]:
return set_num
return False
def forge_offsets(key, direction, offset):
if type(key) is str:
@0x00dec0de
0x00dec0de / chi.go
Created January 25, 2025 22:51 — forked from alexaandru/chi.go
Chi-like syntactic sugar layer on top of stdlib http.ServeMux
// Chi-like syntactic sugar layer on top of stdlib http.ServeMux.
package main
import (
"net/http"
"slices"
)
type (
middleware func(http.Handler) http.Handler
@0x00dec0de
0x00dec0de / EllipticCurve.go
Created November 28, 2024 21:41 — forked from LukaGiorgadze/EllipticCurve.go
Golang ECDSA (Elliptic Curve Digital Signature Algorithm) example, generate Private/Public key pairs, verify and test
package ec
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/md5"
"crypto/rand"
"crypto/x509"
"encoding/pem"
"errors"
@0x00dec0de
0x00dec0de / notes.txt
Created November 21, 2024 12:25 — forked from dysinger/notes.txt
My /etc/nixos/configuration.nix with full disk encrypted ZFS and USB thumb EXT4 /boot
# EFI/BOOT:
# export BOOT=/dev/disk/by-id/usb-SanDisk_Ultra_Fit_4C530001011030101042-0\:0
# parted --script $BOOT -- \
# mklabel gpt \
# mkpart esp fat32 1MiB 512MiB \
# mkpart primary 512MiB 100% \
# set 1 boot on
# mkfs.vfat $BOOT-part1
# ZFS:
@0x00dec0de
0x00dec0de / gentoo_uefi_fde.md
Created November 20, 2024 22:38 — forked from MoritzMaxeiner/gentoo_uefi_fde.md
Short guide on how to setup Gentoo with full disk encryption on a UEFI system using Gummiboot

Preface

This is an as-short-as-sensible guide of the minimum necessary steps to setup Gentoo with LVM, LUKS, and UEFI booting using Gummiboot. It assumes you are already familiar with the subject of setting up GNU/Linux distributions and would like to know only what is specific to Gentoo for the abovementioned. This is most definitely not the only way, but it is the shortest I - as a current Gentoo newbie - was able to determine.

@0x00dec0de
0x00dec0de / HttpProxy.go
Created April 27, 2024 20:17 — forked from yowu/HttpProxy.go
A simple HTTP proxy by Golang
package main
import (
"flag"
"io"
"log"
"net"
"net/http"
"strings"
)
# 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 [email protected] in .eml format:
# execute as root
/opt/zimbra/bin/zmmailbox -z -m [email protected] getRestURL "//?fmt=tgz" > /tmp/account.tgz
# You can do the same via a REST URL:
wget http://ZIMBRA.SERVER/home/[email protected]/?fmt=tgz
# to restore email:
/opt/zimbra/bin/zmmailbox -z -m [email protected] 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