Skip to content

Instantly share code, notes, and snippets.

@nerdegem
nerdegem / virtualisolocation.txt
Created February 1, 2025 13:48
Finding where a Virtual ISO is mounted FROM in Windows.
If a programme mounts a virtual ISO file in Windows, and you'd like to know where that disk is stored,
Raise an elevated Powershell command and enter
get-volume [DriveLetter] | get-diskimage
E.g.
PS C:\WINDOWS\system32> get-volume F | get-diskimage
Attached : True
BlockSize : 0
@nerdegem
nerdegem / Defender.txt
Last active October 28, 2024 13:46
Onboard Deb into Microsoft Defender
##########
## Script for installing Microsoft Defender for Endpoint on Linux devices.
##
## Get your onboarding configuration from
## Security.microsoft.com
## Settings
## EndPoints
## Device Management
## Onboarding
##
@nerdegem
nerdegem / hevc_rkmpp.txt
Created June 30, 2024 20:02
hevc_rkmpp ffmpeg Encoder options
ffmpeg -hide_banner -v verbose -h encoder=hevc_rkmpp
Encoder hevc_rkmpp [Rockchip MPP (Media Process Platform) HEVC encoder]:
General capabilities: delay hardware
Threading capabilities: none
Supported hardware devices: rkmpp rkmpp drm
Supported pixel formats: gray yuv420p yuv422p yuv444p nv12 nv21 nv16 nv24 yuyv422 yvyu422 uyvy422 rgb24 bgr24 rgba rgb0 bgra bgr0 argb 0rgb abgr 0bgr drm_prime
hevc_rkmpp_encoder AVOptions:
-rc_mode <int> E..V....... Set the encoding rate control mode (from 0 to 4) (default 4)
VBR 0 E..V.......
@nerdegem
nerdegem / gist:20b8b2e2f40207a02bcb146060fac7cd
Created May 9, 2024 12:31
Quick note for mapping multiple NFS volumes in Docker when the server is the same, but you have different exports
##Set these variables
SERVER=nameorip
VOLNAME=remoteexportname
#Change VOLNAME variable for each export
#RUN this command to map each export
docker volume create --driver local \
--opt type=nfs \
@nerdegem
nerdegem / frigate.yml
Created February 7, 2024 23:35
Working Frigate Config
mqtt:
host: 10.1.2.3
user: mqttuser
password: password
database:
path: /db/frigate.db
detectors:
coral1:
@nerdegem
nerdegem / debian
Created January 4, 2024 23:49
Temporarily fixing a debian package that is broken because you ignored depends.
This will probably break something down the line, but to get you out of a bind, you can force a package depends using this hackjob.
edit /var/lib/dpkg/status,
find the package with the broken dependencies
edit the Depends: line to stop the package complaining.
I assume that will be overwritten the next time the package is updated, but that's exactly what i want.
@nerdegem
nerdegem / pingtest from Windows
Created November 1, 2023 10:23
Ongoing Ping Test in Windows
Found this great article on how to continuously ping and monitor in windows from https://community.spiceworks.com/how_to/154193-ping-with-timestamp-and-log
Essentially
1) Open a PowerShell
2) Record the session with
Start-Transcript -path C:/Script/PingLog.txt -Append
3) Run the ping - slighly amended from the reference one, in that this adds in a ping packet size of 1492 bytes (adjust for MTU)
Ping.exe -t 1.1.1.1 -l 1492 | ForEach {"{0} - {1}" -f (Get-Date),$_}
4) Check/review the log file.
@nerdegem
nerdegem / ffmpeg_full_options.txt
Created September 16, 2023 17:11
FFMPEG full options available on my build using ffmpeg -h full
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Getting help:
-h -- print basic options
-h long -- print more options
-h full -- print all options (including all format and codec specific options, very long)
-h type=name -- print all options for the named decoder/encoder/demuxer/muxer/filter/bsf
See man ffmpeg for detailed description of the options.
@nerdegem
nerdegem / glinet_overlay
Created August 20, 2023 20:29
Configuring a GL-iNet for Overlay
Taken from: https://forum.gl-inet.com/t/extroot-configuration/27421
These were the only commands that seemed to work:
I used these commands to configure it, it’s working fine so far, just want to check I won’t run into any issues down the line:
opkg update
opkg install block-mount kmod-fs-ext4 e2fsprogs
DEVICE="$(sed -n -e "/\s\/overlay\s.*$/s///p" /etc/mtab)"
uci -q delete fstab.rwm
@nerdegem
nerdegem / hetznervmware.txt
Created August 5, 2023 11:36
Using Hetzner recovery to install VMWare ESXi without the spider console*
Taking inspiration from this great post https://docs.j7k6.org/vmware-esxi-hetzner-install-kvm-linux/ to get VMWare installed without requiring the SpiderKVM service. Howver, for version 7, the installer requires to see a NIC within the environment so the command needs to be tweaked a little...
kvm -machine pc-i440fx-2.1 \
-cpu host \
-smp cpus=4 \
-m 4096 \
-drive format=raw \
-hda /dev/sdc \
-netdev tap,id=net0 \
-device e1000e,netdev=net0 \