Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block mailinglists35

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View rebuild dkms
for k in $(ls /var/lib/initramfs-tools) ; do
for d in $(cd /usr/src; ls -d *-*) ; do
[[ -f /usr/src/${d}/dkms.conf ]] || continue
m=$(echo $d | sed -r -e 's/-([0-9]).+//')
v=$(echo $d | sed -r -e 's/[^0-9]+-([0-9])/\1/')
sudo /usr/sbin/dkms install -c /usr/src/$d/dkms.conf -m $m -v $v -k $k
mailinglists35 / kill-firefox-mem.ps1
Created May 15, 2019
really discard or suspend firefox tabs
View kill-firefox-mem.ps1
Get-WmiObject Win32_Process -Filter "name = 'firefox.exe'" | where {$_.CommandLine -like '* tab'} | ForEach-Object { Invoke-WmiMethod -Path $_.__Path -Name Terminate }
mailinglists35 / trim.cmd
Created Apr 6, 2019
windows 10 manual ssd trim when optimization not available message
View trim.cmd
powershell "Optimize-Volume -DriveLetter C -ReTrim -Verbose"
right click run as administrator
View disable apparmor for lxd
lxc config set fc29 raw.lxc "lxc.apparmor.profile=unconfined"
View allow regular users to manage libvirt
cat /etc/polkit-1/localauthority/50-local.d/50-libvirt-remote-access.pkla
[libvirt Management Access]
mailinglists35 / file.txt
Last active Jan 25, 2019
What I learned today - Things I might else forget. Let's save this to a public gist on github
View file.txt
`seq -f %05g start end` helps produce numbers padded/prefixed with zeroes.
more on that via Secrets of “printf” by Professor Don Colton
`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
# cat `which watch_dd_rhelper`
while true; do
[ "$reset" == "false" ] || reset=false
cat /proc/$(pidof dd_rescue)/io > $PREVIOUS
sleep 10
mailinglists35 /
Last active Mar 12, 2019
this could vanish anytime from the web. rebuild kernel module. patch kernel centos redhat oracle
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 ~/ ~/
kernver=$(uname -r)
kernbase=$(echo $kernver | sed 's/\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/')
rpmarch=$(rpm -q --qf="%{ARCH}\n" kernel | head -n1)
mailinglists35 / gradio-on-wsl
Last active Feb 3, 2019
How to run Gradio under WSL on windows 10 with pulseaudio for windows and MobaXterm
View gradio-on-wsl
pulseaudio for windows
gradio fc29 rpm build
Setup and run pulseaudio
download the linked zipfile containing preview binaries from
mailinglists35 / zfs-veracrypt-failed-usb-cable.txt
Created Oct 23, 2018
recover veracrypt zfs pool after failed usb cable, without reboot
View zfs-veracrypt-failed-usb-cable.txt
dmsetup table | grep veracrypt
veracrypt2: 0 3904923136 crypt aes-xts-plain64 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 256 8:34 256
dmsetup reload veracrypt2 --table "0 3904923136 error"
dmsetup suspend --noflush veracrypt2
dmsetup resume veracrypt2
(?)zpool clear backup-usb
remove from veracrypt UI
echo "0 3904923136 zero" | dmsetup reload veracrypt2
dmsetup suspend --noflush veracrypt2
dmsetup resume veracrypt2
You can’t perform that action at this time.