Recompress zip-files (PowerShell)
A PowerShell script that recursively re-compresses ZIP files with 7-Zip at maximum settings (Deflate64), reporting how much space each file saved.
19 articles in the notebook
A PowerShell script that recursively re-compresses ZIP files with 7-Zip at maximum settings (Deflate64), reporting how much space each file saved.
Visual Studio 2015 has no GUI support for Areas in ASP.Net 5 yet. The workaround is simple: create the folder structure manually and add an area route in Startup.cs — shown here.
A revisit of my 2011 RDP guide, updated for RDP 8.x: what to tweak on client and server for less bandwidth, higher throughput and adaptive transfers — the short story and the dirty details.
After reinstalling Windows Server 2012 R2 your Storage Spaces don't show up — not even in Computer Management. The fix: authorize the server for read-write and re-attach the virtual disks, via GUI or PowerShell.
NTFS symlinks are well-known to *nix users and unknown to most Windows users. Combine them with Dropbox and your IE favorites (or any folder) silently sync between machines.
I have worked over RDP since around 2000, and bandwidth is usually the bottleneck. Concrete tweaks for RDP on Windows 7 SP1 with RemoteFX to squeeze a smoother desktop out of a slow line.
"Yes!" and "No, never!" — both answers are right. SSDs don't care about fragmented reads, but NTFS does interesting things when free space gets fragmented. What actually matters, and what to do about it.
"Cross-thread operation not valid" explained from the ground up: what the GUI thread actually does, why only it may touch your controls, and how to cross over correctly in WinForms and WPF.
Windows kept detecting my X-Fi's plugs in and out at random, so the speakers did too. The fix is a registry key: EnableDynamicDevices = 0. Took me days to find, hope it saves you the trouble.
Active Directory lets NTDS, NTFrs and NetLogon pick random ports, which makes firewalling a domain controller a pain. Here is how to pin them to fixed ports and finally enable the firewall.
The VS2010 conversion wizard is defect: it tries to rewrite your code when only the solution and project files actually need changing. Convert, then keep only the new .sln and .csproj — step-by-step guide inside.
BitLocker kept demanding the recovery key at boot — first because the docking station snuck new devices into the BIOS boot order, then error 0x26000070 after I tampered with the BCD. Both fixes documented here.
We run a development VM per customer at work, so making them fast matters. A long list of concrete tweaks for Virtual PC, VirtualBox and VMware — from disk layout to services worth disabling.
A good comparative performance test of antivirus products — some make a simple file copy take twice as long. Maybe disabling the antivirus now and then isn't such a bad idea.
One web.config attribute — optimizeCompilations="true" — makes ASP.Net recompile only what actually changed. Less waiting between test runs; links to the patches needed for older Windows versions.
Using ASP.Net State Server during development forces everything you put in Session to be serializable — which means switching to State Server or SQL sessions in production won't blow up in your face later.
Hardcoded IP addresses are never actually required — DNS names or a hosts-file entry always work, cost nothing extra, and save you from hunting down every stale reference when a server moves.
First in a small series on .NET tools worth using: log4net, Apache's free logging framework. One line at the top of each class, a standard XML section in web.config, and you have proper leveled logging.
.NET tools to use, part two: Nini, an uncommonly powerful configuration library. Reads web.config, .ini and .xml config with type conversion and default values in a couple of lines.