Skip to content

Instantly share code, notes, and snippets.

@bretton
bretton / repair-dude.md
Last active March 11, 2025 11:47
Repair Mikrotik Dude database

If you run a Mikrotik Dude instance on CHR, have a lot of devices and years of activity, problems start to arise with errors like:

server status: db failure: disk image is malformed. stop
server status: db failure: database disk image is malformed. stop

The problem might temporarily be resolved by running

#!/bin/bash
@w3servicesdotnet
w3servicesdotnet / readme.md
Created March 18, 2023 15:02 — forked from Trogvars/readme.md
Centos 7 upgrade to 8, Migrate to Stream or Rocky Linux.

Doing upgrade of Centos 7 server to Centos 8. Step to step guide.

1. Migrating backup of working system to virtual guest or another server.

Preparation of test image. Boot from Centos 7 CD into troubleshoot mode and skip to shell. Prepare disks of guest machine. Make partitions and filesystems.

Sda2 - boot - ext2

@daniorio
daniorio / Fixes (Ивенты).txt
Last active July 12, 2025 00:59
Minecraft 1.7.10, 1.12.2, 1.16.5 bukkit and forge mod fixes by LuxinfineTeam, GameForEA and Pa4ok
Контакты:
Discord - daniorio (если поиск не работает, меня можно найти по ссылке ниже)
Discord игрового проекта - https://discord.gg/zuvV5Dx
Сайт игрового проекта - https://luxinfine.su
Список услуг и работ - https://team.luxinfine.su [ВАЖНО]
VK - https://vk.com/luxinfine_team [НЕ АКТИВНО]
На этой странице представлены фиксы для модов майнкрафт 1.7.10, 1.12.2, 1.16.5 от LuxinfineTeam, GameForEA и Pa4ok.
Цены на моды указаны в []. Если авторов несколько, то несколько скобок, для каждого автора фикса своя цена. Последняя скобка - цена за максимальный фикс. Возможно купить либо фикс от GameForEA, либо от GameForEA + Pa4ok, либо от GameForEA + Pa4ok + LuxinfineTeam в одном фиксе. Иных вариантов покупки нет. Если у вас есть фикс от какого-то автора, то платить за него не нужно.
@GAS85
GAS85 / http2_apache2_ubuntu20.04.md
Last active April 2, 2025 16:19
How to Enable HTTP/2 in Apache 2.4 on Ubuntu 20.04

Based on https://gist.github.com/GAS85/8dadbcb3c9a7ecbcb6705530c1252831

Requirements

  • A self-managed VPS or dedicated server with Ubuntu 20.04 running Apache 2.4.xx.
  • A registered domain name with working HTTPS (TLS/SSL). HTTP/2 only works alongside HTTPS because most browsers, including Firefox and Chrome, don’t support HTTP/2 in cleartext (non-TLS) mode.

Step 1: Install Apache2

Per default it will be apache2 version 2.4.41 what is enought for http2 support.

@GAS85
GAS85 / apache2_pihole.md
Last active July 4, 2025 11:53
Apache2 config for pihole with custom / non-admin link
@GAS85
GAS85 / http2_apache2_ubuntu18.04.md
Last active September 29, 2023 12:00
How to Enable HTTP/2 in Apache 2.4 on Ubuntu 18.04

Requirements

  • A self-managed VPS or dedicated server with Ubuntu 18.04 running Apache 2.4.xx.
  • A registered domain name with working HTTPS (TLS/SSL). HTTP/2 only works alongside HTTPS because most browsers, including Firefox and Chrome, don’t support HTTP/2 in cleartext (non-TLS) mode.

Step 1: Install Apache2

SET 1
1. A network ready device is directly connected to a MikroTik RouterBOARD 750 with a correct U.T.P. RJ45 functioning cable. The device is configured with an IPv4 address of 192.168.100.70 using a subnet mask of 255.255.255.252. What will be a valid IPv4 address for the RouterBOARD 750 for a successful connection to the device?
a. 192.168.100.70/255.255.255.252
b. 192.168.100.69/255.255.255.252
c. 192.168.100.71/255.255.255.252
d. 192.168.100.68/255.255.255.252
2. In MikroTik RouterOS, Layer-3 communication between 2 hosts can be achieved by using an address subnet of:
# Для всех перечисленных тут уязвимостей имеются фиксы (или будут сделаны в ближайшее время)
CarpentersBlocks:
1) com.carpentersblocks.network.PacketActivateBlock
1.1) Открытие GUI некоторых блоков в приватах
IC2NuclearControl:
1) shedar.mods.ic2.nuclearcontrol.network.message.PacketClientColor
shedar.mods.ic2.nuclearcontrol.network.message.PacketClientDisplaySettings
shedar.mods.ic2.nuclearcontrol.network.message.PacketClientRangeTrigger
@GAS85
GAS85 / http2_apache2_ubuntu16.04.md
Last active February 7, 2023 16:17
How to Enable HTTP/2 in Apache 2.4 on Ubuntu 16.04

Requirements

  • A self-managed VPS or dedicated server with Ubuntu 16.04 running Apache 2.4.xx.
  • For Ubuntu 18.04 please read here --> https://gist.github.com/GAS85/8dadbcb3c9a7ecbcb6705530c1252831
  • A registered domain name with working HTTPS (TLS/SSL). HTTP/2 only works alongside HTTPS because most browsers, including Firefox and Chrome, don’t support HTTP/2 in cleartext (non-TLS) mode.
@inogo
inogo / ntlm_auth.php
Created January 19, 2017 13:25
PHP NTLM Authentication
<?php // by SiMM
$headers = apache_request_headers(); // получаем все заголовки клиента
if (!isset($headers['Authorization'])) { // если заголовка авторизации нет
header('HTTP/1.0 401 Unauthorized'); // требуем от клиента авторизации
header('WWW-Authenticate: NTLM'); // тип требуемой авторизации - NTLM
exit; // завершаем выполнение скрипта
}
// заголовок авторизации от клиента пришёл
if (substr($headers['Authorization'],0,5) == 'NTLM ') { // проверяем, что это NTLM-аутентификация
$chain = base64_decode(substr($headers['Authorization'],5)); // получаем декодированное значение