Compare commits

..

No commits in common. "cb4b56da965ec90b0b8c8b1389eb29a9d09f6809" and "4cde39d48eff46be582c1b2deff1a17d3689388b" have entirely different histories.

2 changed files with 13 additions and 23 deletions

View file

@ -39,31 +39,24 @@ xtrace () {
set +x set +x
} }
highlight() { echo; echo "$1"; } highlight() { echo "$1"; }
status() { status() {
highlight 'System' highlight 'System'
df -h -T --exclude-type=tmpfs --exclude-type=devtmpfs --exclude-type=squashfs --exclude-type=overlay
zfs list -d 0 2>/dev/null
free -h free -h
sudo certbot certificates 2>/dev/null df -h -T --exclude-type=tmpfs --exclude-type=devtmpfs --exclude-type=squashfs --exclude-type=overlay
zfs list -d 0
sudo certbot certificates
highlight 'Internet' highlight 'Internet'
#--color=always #--color=always
ip -brief address | grep --color=none -E '^(wl|en|tun|vmbr)' ip -brief address | grep --color=none -E '^(wl|en|tun|vmbr)'
ip route ip route
echo -n 'IPv4: ' && timeout 3s ping example.com -A -c 3 -w 3 -q -4 echo -n 'IPv4: ' && timeout 3s ping example.com -A -c 3 -w 3 -q -4
echo -n 'IPv6: ' && timeout 3s ping example.com -A -c 3 -w 3 -q -6 echo -n 'IPv6: ' && timeout 3s ping example.com -A -c 3 -w 3 -q -6
highlight 'Programs' highlight 'Programs'
tmux ls 2>/dev/null tmux ls
$sudo systemctl --no-pager list-units --failed --no-legend || service --status-all $sudo systemctl --no-pager list-units --failed || service --status-all
echo '== WEBSERVER' if type docker >/dev/null
{ sudo lsof -i :443 || sudo lsof -i :80; } | head -4 then $sudo docker ps || $sudo systemctl status docker
echo
if type docker &>/dev/null
then
echo '== DOCKER'
$sudo docker ps || $sudo systemctl status docker
fi fi
} }
@ -74,9 +67,6 @@ disks() {
sudo fdisk -l sudo fdisk -l
} | less } | less
} }
scandisks() {
for host in /sys/class/scsi_host/*; do echo "- - -" | sudo tee $host/scan; ls /dev/sd* ; done
}
__u="$sudo apt update && $sudo apt upgrade" __u="$sudo apt update && $sudo apt upgrade"
alias u="$__u" alias u="$__u"
@ -131,8 +121,8 @@ shopt -oq posix || src /etc/bash_completion
# Fancy prompt # Fancy prompt
PS1="\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]" PS1="\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]"
PS1="$PS1 \`exitcode=\${?}; if test \$exitcode = 0; then printf '\[\033[01;32m\] :)';" PS1="$PS1 \`if [ \$? = 0 ]; then echo -e '\[\033[01;32m\]:)';"
PS1="$PS1 else printf '\[\033[01;31m\]%3d' \$exitcode; fi\`\[\033[00m\]" PS1="$PS1 else echo -e '\[\033[01;31m\]' \$?; fi\`\[\033[00m\]"
;; ;;
(*zsh) setopt sh_word_split;; (*zsh) setopt sh_word_split;;
esac esac
@ -140,4 +130,4 @@ esac
src /usr/share/git/completion/git-prompt.sh && PS1="$PS1\$(__git_ps1 \" (%s)\")" src /usr/share/git/completion/git-prompt.sh && PS1="$PS1\$(__git_ps1 \" (%s)\")"
src $HOME/.config/shell/functions src $HOME/.config/shell/functions
PS1="$PS1 \`test \$UID = 0 && printf '#' || printf '$'\` " PS1="$PS1 \$ "

View file

@ -27,8 +27,8 @@ if beginswith $'\n#' "$original"; then
expr substr "$common" 1 "$count" | sed 's|.local/bin/scripts|bin|') || exit 0 expr substr "$common" 1 "$count" | sed 's|.local/bin/scripts|bin|') || exit 0
case "$path" in ([0-9]-*) path="${path#*-}";; esac case "$path" in ([0-9]-*) path="${path#*-}";; esac
{ {
# Remove initial dot, file extension, trailing slash/dash/underscore # Remove initial dot and trailing slash/dash/underscore
echo "$path" | sed 's|^\.||;s|\.\([a-z]*\)$||;s|[/_-]\?$|: |' echo "$path" | sed 's|^\.||;s|[/_-]\?$|: |'
echo "$original" echo "$original"
} > "$COMMIT_MSG_FILE" } > "$COMMIT_MSG_FILE"
fi fi