In this article, we will see how to use
CRTP
,std::variant
andstd::visit
to increase our code performances.
#!/usr/bin/env bash | |
# tlrecode.sh | |
# Decode and encode TP-LINK router config files. | |
# | |
# Creative Commons CC0 License: | |
# http://creativecommons.org/publicdomain/zero/1.0/ | |
# | |
# To the extent possible under law, the person who associated CC0 with this | |
# work has waived all copyright and related or neighboring rights to this work. |
// For all the confusing Prometheus configuration and | |
// regular expressions, | |
// explained in examples. | |
// Remember, there are default values for each item if it's missing. | |
// regex is (.*), | |
// replacement is $1, | |
// separator is ; | |
// ,and action is replace |
THIS GIST IS EXTREMELY OBSOLETE. DO NOT FOLLOW THESE INSTRUCTIONS. SERIOUSLY.
IF YOU IGNORE THE ABOVE WARNING, YOU AGREE IN ADVANCE THAT YOU DIDN'T GET THESE INSTRUCTIONS FROM ME, THAT I WARNED YOU, AND THAT I RESERVE THE RIGHT TO POINT AND LAUGH MOCKINGLY IF AND WHEN SOMETHING BREAKS HORRIBLY.
I'll do a write-up of current custom-kernel procedures over on Random Bytes ( https://randombytes.substack.com/ ) one day soon.
In this document, I will explain how to upgrade the default systemd
version from 237 to 242.
The main reason why I needed this was related to the DNS-over-TLS that was not supported in the version 237 but available from version 242.
Later, when playing with Lynis, the security auditing tool, I then discovered that the version 242 was also providing the command systemd-analyze
that is used by lynis
to detect if existing systemd
services are configured correctly in the security context, meaning that the existing services can run as expected but needs few or several changes in their configuration to make them safe without any exploitable attack surfaces.
You can try it once you've installed the version 242 of systemd
that way:
import requests | |
import os | |
from collections import defaultdict | |
# I have photos in subfolders like : | |
# /mnt/media/Photos/2023-08 Holidays | |
# /mnt/media/Photos/2023-06 Birthday | |
# /mnt/media/Photos/2022-12 Christmas | |
# This script will create 3 albums | |
# 2023-08 Holidays, 2023-06 Birthday, 2022-12 Christmas |
import magic | |
import r2pipe | |
import hashlib | |
import argparse | |
import subprocess | |
from unicorn import * | |
from unicorn.x86_const import * | |
# from udbserver import * # uncomment this line if you want to debug | |
def pad_size(size): |