Skip to content

Instantly share code, notes, and snippets.

View fiddyschmitt's full-sized avatar

Fidel Perez-Smith fiddyschmitt

  • Brisbane, Australia
View GitHub Profile
@fiddyschmitt
fiddyschmitt / smb_on_non_standard_port.txt
Created December 4, 2025 03:29
SMB on non-standard port
In Windows, there are two issues at play.
The Windows SMB Client only connects on port 445.
The Windows SMB Server reserves port 445 on all interfaces at startup, preventing other applications from binding to it (for the purposes of port forwarding).
The following steps overcome the second issue, ultimately allowing you to access your SAMBA share from a Windows PC via the SSH tunnel.
Admin rights are required for the initial setup.
Allow binding to 127.0.0.2
@fiddyschmitt
fiddyschmitt / ffmpeg_ffplay.txt
Created December 2, 2025 02:37
ffmpeg and ffplay
.\ffmpeg.exe -f gdigrab -framerate 30 -video_size 1920x1080 -offset_x 1920 -offset_y 0 -i desktop -vcodec mpeg4 -q 12 -f mpegts udp://127.0.0.1:5000
.\ffmpeg.exe -f gdigrab -framerate 30 -video_size 1920x1080 -offset_x 1920 -offset_y 0 -i desktop -c:v libx264 -preset ultrafast -tune zerolatency -b:v 5000k -maxrate 6000k -bufsize 12000k -g 30 -f mpegts udp://127.0.0.1:5000
.\ffplay.exe -fflags nobuffer -flags low_delay -probesize 20000 -analyzeduration 1 -framedrop -f mpegts udp://127.0.0.1:5000
@fiddyschmitt
fiddyschmitt / qemu_notes.txt
Last active November 17, 2025 06:14
User mode VM
Linux
./qemu-system-x86_64.exe -cdrom "C:\iso\clonezilla-live-3.3.0-33-amd64.iso" -boot d -m 8192 -netdev user,id=net0,hostfwd=tcp:127.0.0.1:5555-:22 -device e1000,netdev=net0
Windows 10
.\qemu-img.exe create -f qcow2 "C:\VMs\win10\disk1.qcow2" 2T
.\qemu-system-x86_64.exe -smp 4 -cdrom "C:\iso\en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96.iso" -hda "C:\VMs\win10\disk1.qcow2" -boot d -m 8192 -netdev user,id=net0,hostfwd=tcp::5555-:22 -device e1000,netdev=net0
@fiddyschmitt
fiddyschmitt / run_remote_apps_locally.txt
Last active November 13, 2025 13:16
Run remote apps locally (seamless RDP using RemoteApp / RDP RAIL)
On the server side:
Allow all apps:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\TSAppAllowList
"fDisabledAllowList"=dword:00000001
On the client side:
@fiddyschmitt
fiddyschmitt / remote_browser_on_debian.txt
Created November 11, 2025 05:53
Run remote browser on Debian
# Only managed to to get Xvnc working rather than xorg
apt update
apt install xrdp tigervnc-standalone-server -y
apt install xinit xorg libfontenc1 -y
apt install openbox firefox-esr -y
nano /etc/xrdp/startwm.sh
@fiddyschmitt
fiddyschmitt / BindingGenerator.cs
Created November 4, 2025 03:41
Use a native windows dll in Linux
using CppSharp;
using CppSharp.AST;
using CppSharp.Generators;
using CppSharp.Parser;
namespace BindingGenerator
{
public class BindingGenerator : ILibrary
{
public static void Main(string[] args)
//This achieves 3 things:
//1. Processes in parallel
//2. Preserves original order
//3. Returns items immediately after they are available
public static IEnumerable<TOutput> SelectParallelPreserveOrder<TInput,TOutput>(
this IEnumerable<TInput> source,
Func<TInput, TOutput> selector,
int? degree = null)
{
var dop = Math.Max(degree ?? Environment.ProcessorCount, 1);
@fiddyschmitt
fiddyschmitt / OpenGL in a VM
Created September 8, 2025 06:59
OpenGL notes
Microsoft has "OpenCL™, OpenGL®, and Vulkan® Compatibility Pack Installer", which seems to use an unrelease Mesa3d for Windows:
https://apps.microsoft.com/detail/9nqpsl29bfff?hl=en-US&gl=US
Alternatively, use mesa-dist-win:
https://github.com/pal1000/mesa-dist-win
@fiddyschmitt
fiddyschmitt / gist:f975b9bc1fc0c75cbf9e4ecf1a10a61e
Created May 1, 2025 06:27
How to enable RemoteFX on server (instructions from IronRDP)
How to enable RemoteFX on server
Run the following PowerShell commands, and reboot.
Set-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services' -Name 'ColorDepth' -Type DWORD -Value 5
Set-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services' -Name 'fEnableVirtualizedGraphics' -Type DWORD -Value 1
Alternatively, you may change a few group policies using gpedit.msc:
Run gpedit.msc.
@fiddyschmitt
fiddyschmitt / gist:87e2feb92d43886e10a50ffb01dd8cc6
Last active April 22, 2025 01:03
Object detection in satellite images
Download tiles.
Zoom 20 is adequate for tennis courts. Zoom 22 is ideal, with diminishing returns.
C:\Users\Smith\Desktop\dev\cs\QldGlobeApps
Convert tiles to geotiff
C:\Users\Smith\Desktop\dev\cs\QldGlobeApps
Run geotiff through geodeep
https://github.com/uav4geo/GeoDeep