| #!/usr/bin/env bash | |
| # | |
| # | |
| # (C)2026 Henri Shustak, All Rights Reserved | |
| # Licence : GNU GPLv3 or later | |
| # | |
| # | |
| # new-vm.bash | |
| # Interactively creates a KVM/QEMU libvirt VM with a configurable | |
| # boot mode (BIOS or UEFI), generic "linux2022" OS variant, a |
| #!/bin/bash | |
| # Detect processes being ptraced via /proc/<pid>/status | |
| # I am sure there are better ways! | |
| while true; do | |
| for pid in /proc/[0-9]*/status; do | |
| tracer=$(grep -m1 "^TracerPid:" "$pid" 2>/dev/null | awk '{print $2}') | |
| if [[ -n "$tracer" && "$tracer" != "0" ]]; then | |
| target_pid=$(echo "$pid" | grep -oP '\d+') | |
| tracer_comm=$(cat /proc/${tracer}/comm 2>/dev/null) |
| # set existing process to be in 'Best Effort' class with priority 6 in that class | |
| # within the 'Best Effort' class priority 0 is highest and 7 is the lowest | |
| ionice -c 2 -n 6 -p <PID> | |
| # check what values are set for an existing process | |
| ionice -p <PID> |
| # run a scan and create a log file badblocks.log | |
| sudo badblocks -v -s -o badblocks.log /dev/sdX # assumes sdX is your raw device | |
| # full process tree organized by cgroup | |
| systemd-cgls | |
| # resource usage per cgroup | |
| systemd-cgtop | |
| # view cgroup filesystem | |
| ls /sys/fs/cgroup/ |
| # resolve power management issues on intel mac computers running LINUX | |
| # | |
| # add the acpi_osi=!Darwin Kernel Parameter | |
| # | |
| # edit GRUB: | |
| sudo nano /etc/default/grub | |
| # find the line GRUB_CMDLINE_LINUX_DEFAULT and add 'acpi_osi=!Darwin', 'quiet' and 'spash' paraemters example follows : | |
| GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=!Darwin quiet splash" |
| # initiate a short self-test | |
| sudo nvme device-self-test /dev/nvme0 -s 1 | |
| # realtime view | |
| sudo nvme device-self-test /dev/nvme0 --dry-run 2>/dev/null || sudo nvme self-test-log /dev/nvme0 |
| # list key binds | |
| ghostty +list-keybinds | |
| # helpful links | |
| https://ghostty.org/docs/config/keybind/reference |
How to set up WireGuard as an iOS VPN configuration in order to tunnel all traffic from an iOS or iPadOS device through a Linux server.
While there are many configurations possible, my intentation was to secure the traffic from my iOS device by routing it securely through a Linux server. As such, this HowTo will show you how to set-up an initial working configuration, which you can customize afterward.
Most likely things will be missing, such as how to configure the firewall or the init scripts on your Linux distribution. As it won't be possible to cover all Linux flavors this HowTo will attempt to give you a working WireGuard configuration, leaving it up to you to fill-in the blanks. Feel free to write a comment to touch upon your specific situation to help others that might stumble upon this HowTo :)
Note: In these configuration examples I use
10.8.0.1/24and10.8.0.2/24. However, as WireGuard IPs may not overlap your other network interfaces