Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

sudo tcpdump -ni any "(icmp and (icmp[0] != 8) and (icmp[0] != 0) or (tcp and not ((tcp[tcpflags] & (tcp-push|tcp-ack|tcp-syn|tcp-fin) != 0) or (tcp[13]=18) or ((tcp[tcpflags] == tcp-fin) and (tcp[tcpflags] == tcp-ack)) ))) and not host (17.17.17.17 or 192.168.1.2) and not tcp port (852 or 442) and not ip6"
@mailinglists35
mailinglists35 / ios vmware update
Created August 18, 2021 14:38
ios update under windows virtual machine (vmware)
when itunes or other 3rd party updating software runs, iphone changes back and forth it's usb identifiers. this confuses vmware and you lose connection to phone in the middle of update. to overcome this, when iphone changes usb identifiers, do this:
pause the virtual machine
restart the vmware usb arbitrator service
resume virtual machine
reconnect the removable devices -> apple iphone
https://docs.microsoft.com/en-us/windows/privacy/manage-connections-from-windows-operating-system-components-to-microsoft-services
https://docs.microsoft.com/en-us/windows/privacy/manage-windows-1903-endpoints
https://docs.microsoft.com/en-us/windows/privacy/windows-endpoints-1903-non-enterprise-editions
https://docs.microsoft.com/en-US/windows/deployment/update/windows-update-troubleshooting
https://docs.microsoft.com/en-us/windows/deployment/update/delivery-optimization-proxy
https://docs.microsoft.com/en-us/windows/deployment/update/waas-delivery-optimization
@mailinglists35
mailinglists35 / pci-passthrough.md
Created April 3, 2021 22:06 — forked from ulkeshkosh/pci-passthrough.md
PCI-Passthrough Rig, OS, and Setup

Introduction

This is my guide for a successful PCI-Passthrough from Linux (Arch Linux) to QEMU/KVM via virt-manager and libvirtd into a Windows 10 Home guest.

NOTE: This is a guide for Intel only. I do not own an AMD machine, and will not add AMD information this guide until such time that I do, which could be never.

Hardware

Device Type Device
CPU Intel Core i7 7700K Quad-Core, Hyperthreading
Motherboard Gigabyte Z270X-Gaming 5
echo
#1) Stop all the virtual machines.
#2) Move all the storage domains other than hosted_storage to maintenance
#which will unmount them from all the nodes.
#3) Move HE to global maintenance
hosted-engine --set-maintenance --mode=global
#4) stop HE vm by running the command
hosted-engine --vm-shutdown
#5) confirm that engine is down using the command
hosted-engine --vm-status
zpool create \
-o ashift=13 \
-o failmode=continue \
-o autotrim=on \
-O atime=off \
-O dnodesize=auto \
-O mountpoint=/srv/zfs \
-O xattr=sa \
-O acltype=posixacl \
-O compression=on \
@mailinglists35
mailinglists35 / rebuild dkms
Created November 17, 2019 13:15
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
done
done
via https://askubuntu.com/a/1012619
@mailinglists35
mailinglists35 / kill-firefox-mem.ps1
Created May 15, 2019 12:23
really discard or suspend firefox tabs
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 April 6, 2019 19:30
windows 10 manual ssd trim when optimization not available message
powershell "Optimize-Volume -DriveLetter C -ReTrim -Verbose"
right click run as administrator
lxc config set fc29 raw.lxc "lxc.apparmor.profile=unconfined"