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
| /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 |
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
| 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 |
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
| 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\\ |
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
| #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 |
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
| 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 |
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
| interface=eth1 | |
| bind-interfaces | |
| domain=pxe.local | |
| dhcp-range=eth1,192.168.100.51,192.168.100.55,255.255.255.0,8h | |
| dhcp-option=3,192.168.100.2 # gateway | |
| dhcp-option=6,192.168.100.2 # dns | |
| enable-tftp | |
| tftp-root=/srv/tftp | |
| dhcp-vendorclass=BIOS,PXEClient:Arch:00000 | |
| dhcp-vendorclass=UEFI32,PXEClient:Arch:00006 |
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
| ubuntu-disable-nm() { | |
| (systemctl list-unit-files Network* --legend=false --no-pager|awk '{print $1}')| \ | |
| xargs -rn1 -P0 sudo bash -c \ | |
| 'systemctl stop $0;systemctl disable $0;systemctl mask $0;systemctl daemon-reload;systemctl reset-failed' | |
| };export -f ubuntu-disable-nm |
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 python3 | |
| import sys | |
| import codecs | |
| import os | |
| from urllib.parse import urlparse | |
| from launchpadlib.launchpad import Launchpad | |
| cachedir = "~/.launchpadlib/cache" | |
| if sys.stdout.encoding is None: | |
| sys.stdout = codecs.open("/dev/stdout", "w", 'utf-8') |
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
| for DB in $(sudo -iu postgres psql -Atc '\l'| awk -F"|" '!/^=|^postgres=|template/{print $1}');do | |
| export LLC="$(printf '\u2500')" SLONG=$(echo Database: ${DB}|wc -m) | |
| printf "\n\e[1mDatabase:\e[0m ${DB}\n"; | |
| eval printf "%.3s" ${LLC}{0..$(echo ${SLONG})};echo; | |
| sudo -iu postgres psql ${DB} -xtc \ | |
| 'SELECT pg_size_pretty( pg_database_size( '"'"''${DB}''"'"' ) ) As human_size, pg_database_size( '"'"''${DB}''"'"' ) As raw_size;' | |
| done |
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
| ########################################################### | |
| # Reindex all indexes in the current instance of postgres # | |
| ########################################################### | |
| (sudo -iu postgres psql -Atc 'SELECT tablename,indexname from pg_indexes ORDER BY tablename,indexname;')| \ | |
| awk -F"|" '{print $1,$2}'| \ | |
| xargs -rn2 -P1 bash -c \ | |
| 'echo "Reindexing index $1 from table $0";sudo -iu postgres psql -c "REINDEX INDEX $1;"' | |
| ######################################################################################## | |
| # Reindex all indices in all tables in all databases in current instance of postgresql # |