This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# toggle auto aconnect | |
# Henri Shustak 2023 | |
# Released under under MIT Licence | |
# version 1.1 - initial release | |
# version 1.2 - will work no matter the state of the lock files | |
toggle_file=/tmp/bluetooth_connect.toogle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# Simple Script which prints the maximum load factor to stdout. | |
# Henri Shustak (C) 2023 | |
# Released Under GNU GPL v3 or later | |
# version 1.0 initial release. | |
# version 2.0 bug fix which resulted in different load factor being reported. | |
# version 3.0 added date to output | |
# version 4.0 added an optional reset paramater | |
# version 4.1 bug fix regarding reset time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# auto detect password and xsession authority IPv4 local host and keep running after disconnect (-forever). | |
x11vnc -noipv6 -forever -listen 127.0.0.1 -usepw -find | |
# set a password (default location - ~/.vnc/passwd) | |
x11vnc -storepasswd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set a domain to auto start | |
virsh autostart <machine/domain> | |
# show all domains set to autostart | |
virsh list --all --autostart | |
# show all domains not set to autostart | |
virsh list --all --no-autostart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# show open TCP ports which are listening on the host | |
sudo lsof -nP -iTCP -sTCP:LISTEN | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# show various commands | |
tmux list-commands | |
# list tmux sessions | |
tmux list-sessions | |
# create new session with specific name | |
tmux new -s <my-session-name> | |
# rename a session |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# basic status information | |
wg show | |
# enable wiregaurd unit (interface wg0) with systemctl | |
sudo systemctl enable --now wg-quick@wg0 | |
# disable wiregaurd unit (interface wg0) with systemctl | |
sudo systemctl disable --now wg-quick@wg0 | |
# bring up wireguard (interface wg0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edits you can make to ~/.config/fish/config.fish | |
# do not compress the PWD readout | |
set fish_prompt_pwd_dir_length 0 | |
# remove the fish greeting or set it to something else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# requires sendEmail to be installed. | |
SYSTEM_NAME="hostname" | |
FROM_EMAIL="[email protected]" | |
TO_EMAIL="[email protected] [email protected]" | |
SMTP_SERVER_NAME="smtp.com:587" | |
SMTP_USER_NAME="smtp__user_name" | |
SMTP_PASS="smtp_password" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### APT Tips (tested only on Ubuntu) | |
## | |
## Problem : | |
## The following packages have been kept back | |
## | |
## Possible Solutions (depending on the situation) : | |
# non-manual upgrade of kept back packages (safest) : | |
sudo apt-get --with-new-pkgs upgrade | |
sudo apt-get --with-new-pkgs upgrade <list of packages kept back> |