Skip to content

Instantly share code, notes, and snippets.

View bmegli's full-sized avatar

Bartosz Meglicki bmegli

  • Poland
View GitHub Profile
@bmegli
bmegli / ubuntu_unnatended_upgrade_state.md
Created August 18, 2023 10:45
Ubuntu unnatended upgrade state (`Waiting for cache lock...`)

Checking Status

# check service status
sudo systemctl status unattended-upgrades
# check service log
journalctl --unit unattended-upgrades
@bmegli
bmegli / route_A_through_B_to_C.md
Created March 17, 2024 13:18
route traffic from A over B network interfaces to C

Scenario

# B has 2 network interaces, A reachable through one, C reachable through other
# We want A to C communiation (over B)
A----B----C

Ad-hoc solution

@bmegli
bmegli / change_cpp.py
Last active April 29, 2025 13:26 — forked from Meltwin/change_cpp.py
Change all the CMakeLists.txt policy regarding the C++ standard to use C++17
import os
from colorama import Fore, Style
WANTED_WIDTH = 100
DISPLAY_WIDTH = min(WANTED_WIDTH, os.get_terminal_size().columns - 2)
print("┏" + "".center(DISPLAY_WIDTH, "━") + "┓")
print(f"┃{Fore.RED}" + "CMakeLists to C++17 Utils".center(DISPLAY_WIDTH, " ") + f"{Style.RESET_ALL}┃")
print(f"┃{Style.BRIGHT+ Fore.BLACK}" + "Meltwin - 2023".center(DISPLAY_WIDTH, " ") + f"{Style.RESET_ALL}┃")
print("┗" + "".center(DISPLAY_WIDTH, "━") + "┛")
print()