Skip to content

Instantly share code, notes, and snippets.

mailinglists35

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
@mailinglists35
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
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]
Identity=unix-user:someuser;unix-user:youruser
Action=org.libvirt.unix.manage
ResultAny=yes
ResultInactive=yes
ResultActive=yes
@mailinglists35
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
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
View watch_dd_rhelper.sh
# 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
@mailinglists35
mailinglists35 / www.pixelbeat.org-docs-rebuild_kernel_module.html
Last active Mar 12, 2019
this could vanish anytime from the web. rebuild kernel module. patch kernel centos redhat oracle
View www.pixelbeat.org-docs-rebuild_kernel_module.html
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)
@mailinglists35
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
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/
@mailinglists35
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
@mailinglists35
mailinglists35 / block_dump
Created Oct 23, 2018
iotail echo 1 > /proc/sys/vm/block_dump
View block_dump
https://lxadm.com/Simple_filesystem_read/write_tracing_with_/proc/sys/vm/block_dump
You can’t perform that action at this time.