Skip to content

Instantly share code, notes, and snippets.

@henri
henri / WireGuard iOS HOWTO.md
Created December 15, 2025 22:32 — forked from 4np/WireGuard iOS HOWTO.md
Setting up WireGuard to secure iPhone traffic

WireGuard

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/24 and 10.8.0.2/24. However, as WireGuard IPs may not overlap your other network interfaces

@henri
henri / configure_X11_server.md
Last active December 15, 2025 21:01
x11 cheatsheet

X11 server cheat sheet

Number of supported clients / servers

/etc/X11/xorg.conf.d/99-maxclients.conf

Section "ServerFlags"
    Option "MaxClients" "512"
EndSection
@henri
henri / linux_ssd_maintantace_cheat_sheet.txt
Last active November 27, 2025 04:55
ssd maintance / types of flash memory storage
#
# SSD's and flash memory is available in a variety of different flavours.
# As power drains from souch a system you stand to lose those bits!
#
# Firmware plays an important role in all of this.
#
# If your SSD is not powered up then the firmware will not be able
# help you out. Most firmware is propriortary and as such, you can
# power the drive up for a while (...?...) and hope for the best.
#
@henri
henri / open_files_linux_cheat_sheet.txt
Last active November 18, 2025 20:48
open file linux cheat sheet
# show the limits in place on the system
ulimit -a
# system wide ulmits
ulimit -Sn # soft limit
ulimit -Hn # hard limit
# list open files for all processes and sort them by how many files are open
for pid in /proc/[0-9]*; do echo "PID = $(basename $pid) : $(ls $pid/fd 2>/dev/null | wc -l) open files"; done | sort -n -k5,5
@henri
henri / linux_quick_look_systems_cheat_sheet.txt
Created November 17, 2025 20:04
linux quick look systems
preview / quicklook systems
# nemo
sudo apt install nemo-preview ffmpegthumbnailer tumbler
# nutilus
sudo apt install gnome-sushi
@henri
henri / dict_setup_cheat_sheet.txt
Last active November 17, 2025 19:58
dictonary setup cheatsheet linux
# install on debian dirivitve (commdn line program)
sudo apt install dict dictd dict-gcide dict-wn
# look up english word
dict "word"
# lookup word just int he collabrative internation dictonary of Ensligh
dict -d gcide "hello"
@henri
henri / txt-2-speech-english-local.bash
Last active December 8, 2025 04:16
elevenlabs.io and localai.io API scripts
#!/bin/bash
#
# (C)Copyright 2025
# Henri Shustak
# Released Under the MIT licence
#
# Script which takes text via standard in and generates an audio file and then plays that audio file.
# Text to speach is processed via LocalAI API. You will require a API Key to get a valid response
# You will also need to setup LocalAI and specify your the host and port number (within the URL varable).
# Learn more about LocalAI : https://localai.io/
@henri
henri / parecord_cheatsheet.txt
Created October 24, 2025 01:06
parecord cheatsheet (record and play audio)
# list audio soruces # look for .minitor
pactl list short sources
# record in flac
parecord --channels=2 --file-format=flac --device=your.monitor output.flac
# play back flac
parecord -play output.flac
# play back with play
@henri
henri / ssh_tunnel_cheatsheet.txt
Last active October 23, 2025 09:31
ssh tunnel cheatsheet
#
# ssh using the -N falg for establishing a tunnel is great.... but somtimes it is difficult to know if authentication has
# been successful (especially if you have any kind of extended login delays setup on a remote system) and you are
# authenticating with a password (did I type that correctly).
#
# this approach requires little additional setup and prevents lots of verbosity regarding the login.
#
# recive notification that authentication succeeded - bash
ssh -v <user>@<remote-host> -p <port> -L <localport>:<tunnel-host>:<remoteport> -N 2> >(grep Authenticated >&2)

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r