View amt-check.sh
This file contains 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
amt-check() { | |
local G=https://github.com/mjg59/mei-amt-check.git | |
if [[ ! -f /srv/$(basename ${G%.*})/mei-amt-check ]];then | |
sudo chown -R $(id -un 1000):$(id -gn 1000) /srv | |
git clone ${G} /srv/$(basename ${G%.*}) | |
cd /srv/$(basename ${G%.*}) | |
make | |
fi | |
[[ -x /srv/$(basename ${G%.*})/mei-amt-check ]] && { sudo /srv/$(basename ${G%.*})/mei-amt-check; } | |
};export -f amt-check |
View lxd-maas-microcloud-2022.sh
This file contains 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 | |
# vim: set et ts=2 sw=2 filetype=bash : | |
[[ $_ != $0 ]] || { printf "\n\e[2G\e[1mPlease source this script!\e[0m ( e.g. \"source ${BASH_SOURCE[0]}\" )\n\n"; sleep 1;exit; } | |
maas-microcloud-lxd() { | |
[[ -n ${FDEBUG} && ${FDEBUG} = true ]] && { set -x &>/dev/null; } | |
local DESC="${FUNCNAME}: Deploy a LXD Cluster via MAAS command line" | |
local CI_TZ='America/Los_Angeles' | |
local CI_LC='en_US.UTF-8' | |
local CI_TC=${CI_LC:3:2} |
View get-lxd-migrate.sh
This file contains 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
sudo wget -qO /usr/local/lxd-migrate --show-progress --progress=bar:force:noscroll $(curl -sSlL https://github.com/lxc/lxd/releases/latest|awk -F'"' '/href.*lxd-migrate/{print "https://github.com"$2}') | |
sudo chmod +x /usr/local/bin/lxd-migrate |
View zfs-snapshots
This file contains 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
zfs-disable-snapshots() { | |
systemctl --user stop zsys-user-savestate.timer | |
systemctl --user disable zsys-user-savestate.timer | |
sudo mv /etc/apt/apt.conf.d/90_zsys_system_autosnapshot /etc/apt/apt.conf.d/90_zsys_system_autosnapshot.disabled | |
};export -f zfs-disable-snapshots | |
zfs-enable-snapshots() { | |
systemctl --user start zsys-user-savestate.timer | |
systemctl --user enable zsys-user-savestate.timer |
View install-kasa.sh
This file contains 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 | |
declare -ag KASA_PKG_LIST=(); | |
for i in python3.10-venv build-essential python3 python3-pip python3-poetry python3-cachecontrol python3-argcomplete python3-all-dev python3-wheel python3-setuptools python-all-dev python-setuptools python3.10-venv python3-virtualenv;do | |
[[ $(dpkg -l $i|awk '/'${i}'/{print $1}') = ii ]] && { true; } || { PKG_LIST+=("${i}"); }; | |
done | |
[[ ${#KASA_PKG_LIST[@]} -ge 1 ]] && { sudo apt install ${KASA_PKG_LIST[@]} -yqf --auto-remove --purge -o Acquire::ForceIPv4=true; } || { true;printf "\n\nAll package dependencies already installed\x21\n\n"; } | |
python3 -m pip install --user --upgrade pip | |
python3 -m pip install --user virtualenv | |
python3 -m pip install --user python-kasa --pre |
View mikrotik.beep.music.sh
This file contains 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
/system script add dont-require-permissions=no name="Super=Mario-Bros" owner=admin policy=read source=":beep frequency=660 length=100ms;\n:delay 150ms;\n:beep frequency=660 length=100ms;\n:delay 300ms;\n:beep frequency=660 length=100ms;\n:delay 300ms;\n:beep frequency=510 length=100ms;\n:delay 100ms;\n:beep frequency=660 length=100ms;\n:delay 300ms;\n:beep frequency=770 length=100ms;\n:delay 550ms;\n:beep frequency=380 length=100ms;" | |
/system script add dont-require-permissions=no name="Thunderstruck" owner=admin policy=read source=":local n11 63,66;\n:local n12 64,67;\n:local n21 71,69,68,69,68,66,68,64,66,63;\n:local n22 64,63;\n \n:local n11 (\$n11,\$n11);\n:local n12 (\$n12,\$n12);\n:local n1 (\$n11,\$n11,\$n12,\$n12);\n:local n2 (\$n21,\$n22,\$n22,\$n22);\n:local notes (\$n1,\$n1,\$n2,\$n2);\n \n:local ticks 2;\n:local speed 55ms;\n:local stacc 5ms;\n# Transposition \n:local transpose -48;\n# ============================== \n# Don't change this: \n:local frqtab 8372,8869,9397,9956,10548,11175,11839,12543 |
View aws-ec2_metadata.txt
This file contains 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
block-device-mapping/ami | |
block-device-mapping/ebsN | |
block-device-mapping/ephemeralN | |
block-device-mapping/root | |
block-device-mapping/swap | |
elastic-gpus/associations/elastic-gpu-id | |
elastic-inference/associations/eia-id | |
events/maintenance/history | |
events/maintenance/scheduled | |
events/recommendations/rebalance |
View fbcon-show-rotation.sh
This file contains 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
fbcon-show-rotation() { | |
(clear;printf "\n\nfbcon=rotate:0\t\tfbcon=rotate:1\tfbcon=rotate:2\t\tfbcon=rotate:3\n";(printf "\\u256D\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500T\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u256E\t\\u256D\\u2500\\u2500\\u2500R\\u2500\\u2500\\u2500\\u256E\t\\u256D\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500B\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u256E\t\\u256D\\u2500\\u2500\\u2500L\\u2500\\u2500\\u2500\\u256E\n"; printf "\\u2502\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u2502\t\\u2502\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u2502\t\\u2502\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u2502\t\\u2502\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u2502\n"; printf "L\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\u200AR\t\\u2502\\u200A\\u200A\\u200A\\u200A\\u200A\\u200A\\ |
View apt-cloud-init.yaml
This file contains 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
#cloud-config | |
## Writing out any credentials for private ppa access. If you need this configured early, use a bootcmd | |
## If can wait until the target environment is available, use a write_files: | |
bootcmd: | |
- ['cloud-init-per', 'once', 'apt1', 'echo', 'bWFjaGluZSBwcml2YXRlLXBwYS5sYXVuY2hwYWQubmV0L2Nhbm9uaWNhbC1rZXJuZWwtcnQvcmVsZWFzZS91YnVudHUgbG9naW4gamFuZS11c2VyIHBhc3N3b3JkICA2UFBSNzRwcU9SWElqc3JJczhBVwptYWNoaW5lIHByaXZhdGUtcHBhLmxhdW5jaHBhZC5uZXQvY2Fub25pY2FsLWtlcm5lbC1ydC9wcm9wb3NlZC91YnVudHUgbG9naW4gamFuZS11c2VyIHBhc3N3b3JkICBCRnBNc0RXZjVtV1lzU3cxUExRYwptYWNoaW5lIHByaXZhdGUtcHBhLmxhdW5jaHBhZC5uZXQvY3Jicy9zdGFibGUvdWJ1bnR1IGxvZ2luIGphbmUtdXNlciBwYXNzd29yZCAgUWZramZWWWNSSTVkR3VWYlhJb2gKbWFjaGluZSBwcml2YXRlLXBwYS5sYXVuY2hwYWQubmV0L3VidW50dS1hZHZhbnRhZ2Uvc2VjdXJpdHktYmVuY2htYXJrcy91YnVudHUgbG9naW4gamFuZS11c2VyIHBhc3N3b3JkICBhb3hMNHZlR0RGU1kwaGpWUUhHSAptYWNoaW5lIHByaXZhdGUtcHBhLmxhdW5jaHBhZC5uZXQvY3Jicy9zdGFibGUvdWJ1bnR1IGxvZ2luIGphbmUtdXNlciBwYXNzd29yZCAgdTBRRTNHTXZpR2RqTnB2NEx3aHUKbWFjaGluZSBwcml2YXRlLXBwYS5s |
View htmltab.sh
This file contains 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
sudo apt install pipx -yq | |
pipx install git+https://github.com/flother/htmltab | |
# Too many commas in table to make a CSV. Cleanup output and use pipes as the delimiter | |
(htmltab https://linux.dell.com/repo/community/openmanage|sed 's/,"|/|"/g;s/),"/)|/g;s/","/|/g;1s/,/|/g;s/,,/|/g;s/LTS,/LTS|/g;s/),v/)|v/g;s/),N/)|N/g;s/,\r$/|/g;s/(/ (/g')|tee ~/dell.psv |
NewerOlder