Windows 7 hotfix for unnecessary chkdsk at boot

I’m posting this here so I can find it again later, because this one caused a surplus of annoyance before I finally found a solution…

I have a Windows 7 x64 laptop which would randomly (once or twice a week) set the NTFS “dirty” bit on its C: drive, causing chkdsk to run at boot and find… well, no problem whatsoever. Sometimes this glitch would be heralded by a system tray / notification area message that the filesystem was allegedly corrupt, but often there would be no warning (aside from NTFS Event 55 messages in the system event log, or the output of

fsutil dirty query c:

if I bothered to run it manually), until chkdsk began its long run the next time I restarted the computer. Yeah, I know I could have used

chkntfs /x c:

to stop boot-time filesystem checks altogether, but then if there actually were a legitimate problem one day… :)

Anyway, after a couple months of this I finally hit upon this discussion on Microsoft TechNet, which in turn led me to KB 982927, including a hotfix (Fix316593). Microsoft makes you jump through some hoops to get the hotfix (you have to do an email confirmation …

Read more…

GTK+ and Haskell (gtk2hs) on Windows

Update: Jacob Stanley has a great article on installing gtk2hs on Windows which goes into more detail, including a tutorial on GTK theming.

Gtk2hs is my favorite way to do cross-platform GUI programming in Haskell — and it’s the toolkit to use if you want to work through the examples in the excellent *Real World Haskell*. But the official instructions for building gtk2hs on Windows leave out some important information, so here’s how I got it all working on Windows 7…

Haskell Platform

First of all, if you haven’t done so already, download and install the latest release of the Haskell Platform for Windows (version 2010.2.0.0 at the time of this writing). Opt for the installer to add GHC and friends to your %PATH%.

GTK+

Next download the GTK+ 2.16 all-in-one bundle and extract it to C:\Gtk, then add C:\Gtk\bin to %PATH% by hand. (Alas, I was unable to get gtk2hs 0.11 to build with GTK+ 2.22 — it failed complaining that c:/devel/dist/win32/libpng-1.4.3-1/lib doesn’t exist, and I didn’t feel like messing with it beyond that point.) If you have Cygwin stuff …

Read more…

Windows tool to clean up OS X junk files

I wrote a little old-school Windows HTA script to delete the .DS_Store, .Trashes, and ._* junk files and directories typically littered across non-HFS media by Mac OS X:

nosx

You can download it from my GitHub account if you have a use for this sort of thing. Written and tested with Windows 7 and IE 8; I’m not sure how it will work with earlier versions of either. Standard disclaimers apply: use at your own risk, etc.

Incidentally, I think HTAs are really underrated as Windows scripting goes. More on that topic later…

Importing Movable Type Markdown into WordPress

Once again I’ve up and moved my whole little site here to a new platform — Wordpress 3, this time around, on top of Nginx + PHP-FPM + (obviously) MySQL on FreeBSD 8.1. I think I’m making a tradition of tearing down the site and rebuilding it from scratch once every, what, two years? Or maybe I’ll actually manage to keep it fresh this time around…

Heh.

Anyway, I could ramble on forever about why I ditched Movable Type and went with friggin’ WordPress. (What kind of wannabe hipster web developer doesn’t roll his or her own Django / Rails / whatever blogging software? And PHP?! Son, I am disappoint.) But that’s not what this post is about. This post is about a minor detail of how I exported the old site from MT.

You see, Movable Type supports text entry in Markdown format. And it’s cool and groovy and way better than typing out HTML by hand, but the problem is that when you ask MT to export your site, it exports your Markdown posts as unprocessed Markdown, not as HTML. So when you then attempt to import this into a program that doesn’t understand …

Read more…

Firefox 3.5 on Debian Lenny AMD64

Now that Firefox 3.5 is out, I wanted to get it running on my 64-bit Debian 5.0 laptop—but there’s no 3.5 package in Sid yet, as of July 2, and mozilla.com only carries 32-bit binary tarballs for Linux. So I had to build Firefox 3.5 from source. Fortunately this turned out to be a lot less painful than I had imagined; this post will show you how I did it, in case you’re in a similar spot.

Build dependencies

The first thing to do is to make sure you’ve installed everything for the build process. Since you’re on a nice, civilized operating system like Debian, the following commands should have you covered:

$ sudo apt-get install build-essential libidl-dev autoconf2.13
$ sudo apt-get build-dep iceweasel

Obtaining the Mozilla source code

Mozilla’s official developer guide recommends downloading individual source archives for those who simply want to build a Firefox release, but I decided to get the source via Mercurial checkout, since this way there will be less to download and re-compile each time a security update comes along. The downside to this is that the initial download takes longer, and the full …

Read more…

Pagination