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
# sorce in other config files | |
# source-file ~/.conf/tmux/tmux_reset.conf | |
# bind alt arrorw keys for switching panes | |
bind -n M-Left select-pane -L | |
bind -n M-Right select-pane -R | |
bind -n M-Up select-pane -U | |
bind -n M-Down select-pane -D | |
# start window number at 1 rather than zero (good if you do not have a numpad on your keyboard) |
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> |
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
# How to just buffer each line (rather than the entire input stream) when using awk / gawk to read data from a pipe. | |
awk '{ print $0 ; system("") }' # compatible with POSIX complient systems | |
gawk '{ print $0 ; system("") }' # gawk is smart and will not actually start a sub-shell | |
# fflush - is going to offer something similar (although you can speicify which kind of output you would like to flush). | |
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 | |
# This script is used to clear the arp cache on macOS - it may even work on other operating systems | |
# (C)2005 Henri Shustak | |
# Released Under MIT Licence : http://mit-license.org | |
# check we are running as root | |
currentUser=`whoami` | |
if [ $currentUser != "root" ] ; then | |
echo This script must be run with super user privileges |
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
# macOS 10.15 and later | |
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder |