/etc/X11/xorg.conf.d/99-maxclients.conf
Section "ServerFlags"
Option "MaxClients" "512"
EndSection
| #!/usr/bin/env bash | |
| # | |
| # Create a long running process which may be used for experimentation | |
| # | |
| # | |
| # check how long a process is running in seconds | |
| # ps -p <PID> -o etimes= | |
| # |
| # | |
| # 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. | |
| # |
| # display - ephemeral port range | |
| cat /proc/sys/net/ipv4/ip_local_port_range | |
| # show ports in use (all ports, numeric, processe name) | |
| ss -anp |
| # 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 |
| preview / quicklook systems | |
| # nemo | |
| sudo apt install nemo-preview ffmpegthumbnailer tumbler | |
| # nutilus | |
| sudo apt install gnome-sushi |
| # 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" |
| #!/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/ |
| # 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 |
| # | |
| # 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) |