Getting ancient remote branches in git

My project has 300+ remote branches for a 100-ish person team. That can’t possibly be right.  Here’s some powershell to detect super old branches so I can go annoy their owners about deleting them: git branch -r | ?{ $_ -notlike “*/HEAD *” } | %{ git log $_.Trim() -n 1 –format=format:”%ct %d %h %an…


Stripe-sets via Storage Spaces

I had a bunch of spinning disks sitting around I wanted to stripe together as build output targets.   The RAID hardware in my desktop is known to be flaky, so I decided to try out Storage Spaces.  The default “simple” storage space doesn’t actually span all disks in the pool – it attempts to keep copies…


Super-sharpening(?) the image

I may have forgotten to mention it, but my expertise is not in image processing.  The people who know better will likely tsk mightily at this and upcoming posts. My apologies. =) Last time got me a b&w-converted version of a picture, but didn’t do much with it.  Next up, I need a sequence of…

0

Converting an Image (well, Bitmap really) to Grayscale

First thought – convert the picture to greyscale and increase the contrast to help any kind of edge-detection work.  Some searching found me Bob Powell’s handy guide to increasing contrast and converting to grayscale via ColorMatrix.  With Wikipedia’s explanation of “naive” matrix multiplication in hand I cobbled up a converter that takes a bitmap and…

0

Voyage of the S.S. UPC Scanner

I got this silly idea in my head last week that I’d take my brand-new high-def handheld video camera and use it to produce a catalog of books, DVDs, etc. that are lying around the house.  Simple premise – turn on the camera and wave games, DVDs, etc. at it.  Every Nth frame in the…

0

What’s winsxsmanifestcache(something)_blobs.bin?

Glenn writes: “What is the c:\windows\winsxs\manifestcache\6.0.6001.18000_001c50b5_blobs.bin file and why is it taking up 156Mb on my hard drive? Do I really need a file this big?” That file is used by the Windows Update mechanisms in Vista.  It acts like a cache and is capped at a certain size, but it’s safe to delete.  The…

0

Shipping default values in the registry

Recently, someone asked about how their code should work if a certain configuration setting was missing from the registry. The responses were mixed.  One suggested checking the value of RegQueryValue. Another suggested that the missing value should cause the app to fail. The right answer is “it should use the default value.”  “But hark!” you…

0

Deleting from the WinSxS directory

In Windows Vista, the directory %windir%\WinSxS has much stronger protection on it than it did in Windows XP and Server 2003.  The owner/group is now a SID named “Trusted Installer”, a service SID used to start the TrustedInstaller service.  Users other than the trusted installer are granted only generic-read/generic-execute by default.  This increased protection ensures…

1

On-demand multhreaded critical section creation

A question came up on an internal newsgroup recently – “How do I do on-demand initialization of critical sections in a multithread-aware library?”  The asker didn’t have an explicit Initialize function in which his critical section could be created, and instead wanted to know what the right approach was for creating one on demand. Below…

0

DLLs and resource ID 2 manifests

Manifests at resource ID 2 help simplify the lives of DLL authors who want to consume side-by-side components via static imports. Just before processing your DLL’s static imports and calling its entrypoint, the loader will create and activate an activation context based on the manifest that it finds at resource ID 2. This ensures that all…

0