Skip to content

Instantly share code, notes, and snippets.

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

Dmitrii Mukhin DmitriiMukhin

🏠
Working from home
View GitHub Profile
@DmitriiMukhin
DmitriiMukhin / 0_prerequisites.md
Created July 14, 2025 15:48 — forked from dehsilvadeveloper/0_prerequisites.md
Installing Docker on WSL 2 with Ubuntu 22.04

Installing Docker on WSL 2 with Ubuntu 22.04

Instalando Docker em um WSL 2 com Ubuntu 22.04

Prerequisites

Before start the installation process, make sure you meet the following prerequisites:

  • A Windows 10 operating system with WSL 2 support.
  • WSL 2 enabled.
  • Ubuntu 22.04 installed on WSL 2.
@DmitriiMukhin
DmitriiMukhin / remove_residual_config.sh
Created April 24, 2025 18:18 — forked from zhaostu/remove_residual_config.sh
One-liner to remov all residual config packages in Ubuntu
# Remove all the packages with residual configuration.
# http://stuzhao.blogspot.com/2012/07/removing-all-residual-config-packages.html
sudo apt-get remove --purge `dpkg -l | grep '^rc' | awk '{print $2}'`
@DmitriiMukhin
DmitriiMukhin / ansible_pve_lxc_playbook.yml
Created December 30, 2024 15:31 — forked from pwalkr/ansible_pve_lxc_playbook.yml
Ansible playbook to bring up an LXC container on a Proxmox node
# Inputs:
# proxmox_host # ansible host running proxmox. Is also destination node: for container
# proxmox_user
# proxmox_pass
# vmid # ID for lxc instance in proxmox
# admin_ssh_keys # SSH keys to install for passwordless login
---
- hosts: lxc_guests
vars:
@DmitriiMukhin
DmitriiMukhin / convert_url_file.sh
Created December 3, 2024 15:57 — forked from Craterdome/convert_url_file.sh
Convert a text file of urls (urls.txt) to a bookmarks.html file that can be imported into a browser
#!/bin/bash
#
# Run this script on a file named urls.txt with all your URLs and pipe the output to an HTML file.
# Example: ./convert_url_file.sh > bookmarks.html
# Based on changes from Jan van den Berg: https://j11g.com/2019/08/15/create-a-chrome-bookmark-html-file-to-import-list-of-urls/
echo "<!DOCTYPE NETSCAPE-Bookmark-file-1>"
echo '<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">'
echo '<TITLE>Bookmarks</TITLE>'
echo '<H1>Bookmarks</H1>'

Install TrueNAS SCALE on a partition instead of the full disk

The TrueNAS installer doesn't have a way to use anything less than the full device. This is usually a waste of resources when installing to a modern NVMe which is usually several hundred of GB. TrueNAS SCALE will use only a few GB for its system files so installing to a 16GB partition would be helpful.

The easiest way to solve this is to modify the installer script before starting the installation process.

@DmitriiMukhin
DmitriiMukhin / install.sh
Created September 29, 2024 19:05 — forked from hydrz/install.sh
High Availability K3s and Kube-vip with Cilium
#!/bin/sh
set -e
set -o noglob
# Usage: ./install.sh [options]
#
# Example:
# Installing on first master node run:
# ./install --num 3 --vip 192.168.2.10 --iface eth0
# Installing on other master nodes run:
@DmitriiMukhin
DmitriiMukhin / mts-music.py
Created September 20, 2024 10:19 — forked from 0x1d107/mts-music.py
MTS music downloader. Hashing algorithm was taken from https://github.com/llistochek/yandex-music-downloader
#!/bin/env python
import lxml.html as lh
import urllib.request as rq
import json
import hashlib
from tqdm import tqdm
import sys, os
MTS_MUSIC = "https://music.mts.ru"
"""
@DmitriiMukhin
DmitriiMukhin / mta-sts
Created September 2, 2024 07:05 — forked from Tugzrida/mta-sts
MTA-STS vhost for Nginx
# A simple Nginx vhost to direct all requests to mta-sts.example.com to the mta-sts file.
# Just substitute your domain and certificate paths(MTA-STS *must* be available over HTTPS)
# Then do mkdir -p /var/www/mta-sts/.well-known and add your policy to
# /var/www/mta-sts/.well-known/mta-sts.txt
server {
listen 80;
listen [::]:80;
server_name mta-sts.example.com;
@DmitriiMukhin
DmitriiMukhin / cloudflare_tlsa_mailcow.sh
Created September 1, 2024 12:06 — forked from wardpieters/cloudflare_tlsa_mailcow.sh
Cloudflare TLSA update script for mailcow
#!/bin/bash
zone=domain.nl
dnsrecord=some-server.domain.nl
## Cloudflare authentication details
## keep these private
cloudflare_token="XXXXXX"
# get certificate hash
#!/bin/bash
#####################################################
#This shell script is used for sing-box installation
#Usage:
#
#Author:FranzKafka
#Date:2022-09-15
#Version:0.0.1
#####################################################