Skip to content

Instantly share code, notes, and snippets.

View fiddyschmitt's full-sized avatar

Fidel Perez-Smith fiddyschmitt

  • Brisbane, Australia
View GitHub Profile
Visual Studio → Tools → Options → Text Editor → C# → Advanced
Set:
Run background code analysis for: Entire Solution
Show compiler errors and warnings for: Entire Solution
Click OK
* Block UDP outbound ports 5004 and 9000
* Webex will be forced to use TCP, and the system's TCP SOCKS proxy
.\iperf3.exe -s -p 6000
//TCP
./iperf3.exe -c 127.0.0.1 -p 5001 -t 10 -P 10 --bidir
//UDP
./iperf3.exe --udp -c 127.0.0.1 -p 5001 -b 100K -l 1200 -t 10
Get-WmiObject -Namespace "ROOT\ccm\ClientSDK" -Class CCM_Application | Select-Object Name, Publisher, SoftwareVersion, FullName, Revision, IsMachineTarget, InstallState | Sort-Object Name
Legacy applications might be:
Get-WmiObject -Namespace "ROOT\ccm\ClientSDK" -Class CCM_Program
Ideas:
https://www.powershellgallery.com/packages/SCClient/1.1/Content/SCClient.psm1
@fiddyschmitt
fiddyschmitt / gist:a2176be213bafab57795c3b563d53efc
Last active December 2, 2024 07:34
Force RDP to use dedicated GPU
Force use of GPU:
https://knowledge.civilgeo.com/enabling-gpu-rendering-for-microsoft-remote-desktop/
Increase from 30 to 60 FPS:
https://learn.microsoft.com/en-us/troubleshoot/windows-server/remote/frame-rate-limited-to-30-fps
@fiddyschmitt
fiddyschmitt / PCAPNG to PCAP
Last active February 14, 2025 01:19 — forked from jjsantanna/pcapng2pcap.sh
Convert pcapng to pcap
//pcapng to pcap
cd "C:\Program Files\Wireshark"
editcap -F libpcap -T ether file.pcapng file.pcap
@fiddyschmitt
fiddyschmitt / gist:4c9356bd464d53a9c6b25f3095570a41
Created July 10, 2024 10:27
Restore image onto oversubscribed drive
There's a good post over at [brashear.me][1] which creates a btrfs partition stored as a file. The partition supports compression and can be used by ddrescue transparently. The blog post is reproduced below, should it ever become unavailable.
> As disk sizes explode, I've found myself having to mirror disks which
> I don't have enough storage for. My tool of choice is ddrescue.
> However, it doesn't support compression because it needs to be able to
> seek through the output as it rescues data. A solution I've found is
> to create a sparse file, format it btrfs, and mount it with the
> compression option. This allows ddrescue to operate normally,
> while giving me fast + decent compression.
>
- Server
//Enable Shadow RDP
Windows Registry Editor Version 5.00
; Allow full control without user's permission for RDP shadowing
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services]
"Shadow"=dword:00000002
"DisableShadowConsent"=dword:00000001
//Firewall rules
sudo apt-get update
sudo apt-get install nfs-kernel-server
mount -o size=1G -t tmpfs none /mnt/tmpfs
sudo chmod 777 /mnt/tmpfs
sudo nano /etc/exports
/mnt/tmpfs *(rw,sync,no_root_squash,no_subtree_check)
// ----------------------------------------------------------------------------
// <auto-generated>
// This is autogenerated code by CppSharp.
// Do not edit this file or all your changes will be lost after re-generation.
// </auto-generated>
// ----------------------------------------------------------------------------
using System;
using System.Runtime.InteropServices;
using System.Security;