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
powershell "Optimize-Volume -DriveLetter C -ReTrim -Verbose" | |
right click run as administrator |
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
lxc config set fc29 raw.lxc "lxc.apparmor.profile=unconfined" |
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
cat /etc/polkit-1/localauthority/50-local.d/50-libvirt-remote-access.pkla | |
[libvirt Management Access] | |
Identity=unix-user:someuser;unix-user:youruser | |
Action=org.libvirt.unix.manage | |
ResultAny=yes | |
ResultInactive=yes | |
ResultActive=yes |
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
`seq -f %05g start end` helps produce numbers padded/prefixed with zeroes. | |
more on that via Secrets of “printf” by Professor Don Colton | |
https://web.archive.org/web/20180422200414/http://www.cypress.com/file/54441/download | |
`sed /string/d` deletes the line containing the string | |
`ssh -o StrictHostKeyChecking=no` automatically accepts and saves the public remote host key | |
`ssh -J user@remote:port` make use of a jump host |
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
# cat `which watch_dd_rhelper` | |
#!/bin/bash | |
PREVIOUS=/tmp/previous | |
LAST=/tmp/last | |
reset=false | |
while true; do | |
[ "$reset" == "false" ] || reset=false | |
cat /proc/$(pidof dd_rescue)/io > $PREVIOUS | |
sleep 10 |
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
Building external modules is well documented, but I found the info for rebuilding a single distro kernel module quite disjoint, I guess because it spans both distribution and kernel specific info. Now rebuilding your whole distro kernel is going to take ages due to the number of modules enabled, so the instructions below show how to quickly rebuild and install the minimum required. Note these instructions are based on rpm using distros but should be easily translatable to ones using dpkg. | |
The specific examples below are to patch the snd_intel8x0 driver to get sound working on Fedora 11, and enabling experimental write support on the ufs module which I used to unbrick the FreeBSD based m0n0wall router in the office. | |
Get kernel versions and paths for automation | |
#cat ~/kernel.sh ~/args.sh | |
kernver=$(uname -r) | |
kernbase=$(echo $kernver | sed 's/\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/') | |
rpmarch=$(rpm -q --qf="%{ARCH}\n" kernel | head -n1) |
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
requirements: | |
mobaxterm | |
WSL | |
pulseaudio for windows | |
gradio fc29 rpm build | |
Setup and run pulseaudio https://token2shell.com/howto/x410/enabling-sound-in-wsl-ubuntu-let-it-sing/ | |
quote: | |
download the linked zipfile containing preview binaries from https://www.freedesktop.org/wiki/Software/PulseAudio/Ports/Windows/Support/ |
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
******************************************************************************** | |
WARNING THESE ARE MY PARTICULAR CASE NOTES MADE PUBLIC SO I CAN EASILY FIND THEM | |
DO NOT BLINDLY PASTE WITHOUT UNDERSTANDING WHAT DO THESE COMMANDS DO | |
******************************************************************************** | |
dmsetup table | grep veracrypt | |
veracrypt2: 0 3904923136 crypt aes-xts-plain64 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 256 8:34 256 | |
dmsetup reload veracrypt2 --table "0 3904923136 error" |
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
https://lxadm.com/Simple_filesystem_read/write_tracing_with_/proc/sys/vm/block_dump |
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
[root@stage ~]# cat /etc/systemd/system/ping@.service | |
[Unit] | |
Description=One time ping check of host %I | |
After=network.target | |
[Service] | |
Type=forking #forking makes the unit stay in starting state until ping finishes. oneshot does not work with RemainAfterExit, while type simple makes the unit started as soon as ping starts, which is something we DON'T want | |
Restart=on-failure | |
ExecStart=/bin/ping -q -c 5 %i | |
RemainAfterExit=true |