Inheritance and Virtual Table are often used to create interface in C++ polymorphic class
What if ... there were another way to do this ?
easier, cleaner, faster and more reliable
This article explains how to useCRTP, [std::variant](https://en.cppreference.com/w/cpp/utility/variant andstd::visitto increase code performance.
| #!/bin/bash | |
| if [ $# -ne 1 ]; then | |
| echo "Usage: $0 <submodule full name>" | |
| exit 1 | |
| fi | |
| MODULE_NAME=$1 | |
| MODULE_NAME_FOR_SED=$(echo $MODULE_NAME | sed -e 's/\//\\\//g') |
Had to do this for some advanced networking with KVM, and couldn't figure out how to do it using the Nework Manager gui. Did find an article later that showed how to do it with nmtui, but it's so much easier to record what you did when using the cli.
In the examples below "eth0" is the name of my physical interface. By default on Ubuntu and most distributions that will almost certainly be different, for example: "eno1", "ens1", or "enp2s0".
To see what everything looks like before starting:
This will work with either networkd or NetworkManager as a resolver. In fact, this is the only way to do bridged KVM (libvirtd) networking with NetworkManager.
If you're using NetworkManager (on a desktop or laptop, for example) on your KVM host, follow these instructions to set up a bridge interface.
Once you have the host bridge set up, proceed as follows:
- Create a bridge network device inside KVM. Edit and save the below text as file host-bridge.xml:
| #!/usr/bin/env python3 | |
| import sys | |
| import os | |
| import signal | |
| import threading | |
| import subprocess | |
| from typing import Optional | |
| from pathlib import Path |
If you encounter a problem where you cannot commit changes in Git – neither through the terminal nor via the GitHub Desktop application – the issue might be a freeze during the Git commit process. This is often caused by GPG lock issues. Below is a concise and step-by-step guide to resolve this problem.
Open your terminal and try to perform a GPG operation (like signing a test message). If you see repeated messages like gpg: waiting for lock (held by [process_id]) ..., it indicates a lock issue.
This userscript brings back the Maps button in Google Search results, making it easy to search locations directly in Google Maps.
- Adds a Maps button next to the "All", "Images", "News" tabs in Google Search
- Works across multiple Google domains (.com, .co.uk, .nl, .de, .fr)
- Automatically updates when using Google's dynamic search
- Maintains button presence during navigation