Skip navigation

For the way I use PhantomJS, it has a habit of hanging and leaving me with a bunch of zombie phantomjs.exe processes. My solution was to put together a timer that would periodically kill all phantomjs.exe processes (and all their descendants) which were older than a specified number of minutes. It’s mildly elegant, but also mildly brutish, and much more overhead than I wanted.

I can’t believe this didn’t occur to me sooner. The easier, cleaner way is to add the following to the script you’re having it run:

Now all my phantomjs.exe instances reliably off themselves once the timer elapses.

I recently moved a RavenDB database from a VM with Windows Server 2012 to a new VM with Windows Server 2016 by way of a dump file because I wanted everything to be fresh. Once the import was complete and the new RavenDB installation tried to index my documents using the old indexes I had constructed, I saw this error pop up in the log dozens of times: Common Language Runtime detected an invalid program.

Luckily, I managed to find that one obscure post in the RavenDB Google Group that pointed me in the direction of the solution, which is to force RavenDB to use the old JIT compiler instead of the new RyuJIT that runs by default with .NET Framework 4.6 installations.

In your RavenDB directory, edit  Raven.Server.exe.config and ensure that <useLegacyJit enabled="1" /> is in the <runtime> section, like so:

I recently began leasing a 2017 Subaru Forester with EyeSight, a snazzy system that adds a number of safety and convenience features by utilizing cameras mounted near the rear view mirror. For these to work properly, Subaru highly recommends keeping the area around and below the rear view mirror free of doodads and gadgets — so no phone holders, radar detectors, toll tags, and so forth. But the instructions provided by the North Texas Transit Association (NTTA) regarding placement of their toll tag say to put the thing right below the rear view mirror for it to be scanned properly. What’s a driver to do?

I couldn’t find a definitive answer online, so I called the NTTA. They said they’ve been getting asked this a lot lately, and that it’s fine to put the toll tag on the bottom-left of the windshield over by your registration sticker. I put mine just above it. There you go.

The last time I built a new rig for myself was in October 2005. Oh, sure, I upgraded its CPU, RAM, GPU, and so forth as time went on, but the motherboard (and thus the general core of the machine) lasted over a decade. Go me. But a lot has changed in the past decade, so I’ve finally built something new.

To the point: the motherboard I chose, the GIGABYTE GA-Z170X-Gaming 7, has a Sound Blaster Recon3Di as its onboard audio, but there appears to be a problem with Creative’s drivers when running a 5.1 Surround setup on Windows 10. Every time I reboot, the audio is disabled. To get it working again I have to open their control panel, switch to headphone mode, and switch back to 5.1 Surround. That’s all it takes, but it’s a pretty big annoyance and a huge embarrassment for Creative. Shame on y’all for not testing your drivers before releasing them!

My solution, though utterly ridiculous, is to use reliable old AutoHotkey. This little script has WOMM Certification, so your mileage may vary:

I compiled that and put the resulting executable in an out-of-the-way location. I figured I could create a shortcut that would run as admin in the Startup folder (Run → shell:startup) but soon learned that Windows 10 apparently skips any shortcuts with run as admin specified. I suppose this is to prevent a bunch of UAC blockages from popping up immediately after logging in? Not that it would matter to me, since I disabled UAC, but anyway… this means you have to use the Task Scheduler.

Create a new Task, name it “SBR3Di 5.1 Fix” or something, and make sure to check “Run with highest privileges”. The Trigger is “At log on of any user” and the Action is “Start a program” (your compiled executable). That should do it.

Did I mention this is utterly ridiculous?

Crapital OneTo save you a couple minutes of reading time, here’s the synopsis: if you’re a small business owner on the market for a credit card, don’t get anything from Capital One. If you do, it will become a revolving account on your personal credit report — and you do not want that to happen.

As for the details… one of the cool things about having a business is that you can get it its own credit cards and stuff. These will not show up as revolving accounts on your personal credit report unless you go delinquent or something. I got one of my companies an American Express and it behaved properly (never showing up on my personal credit report), so I expected that when I got us a Capital One Spark Visa, it’d be business as usual.

It was not. Capital One reported the Spark Visa to the credit bureaus on my personal credit report, and my score promptly took a beating. I disputed the report with one of the bureaus, but they said it was accurate according to Capital One. I called Capital One and they confirmed that it is their company policy to put all cards — even those specifically for businesses — on personal credit reports. This is completely unacceptable, and I’ve already begun the process of moving to a new business Visa with another bank.

My grade school days are kind of a blur at this point, which is probably a good thing. I don’t remember many of my teachers, classes, lessons, peers… I can’t tell if that’s just a bad memory or if so much of it simply had no lasting impact. In any case, there are a few things that do stand out, things said by my teachers which have stuck with me to this day. Here are the first three that come to mind:

“Anyone can make a face.”

I was in art classes throughout grade school. I probably shouldn’t have been. I could draw Sonic the Hedgehog and his friends, but that’s about it. None of the stuff they tried to teach us stuck with me, and I couldn’t care less about art history. I remember working with clay in middle school, making a number of pieces that were to be part of a collection. Some of those pieces were faces, or face-like. My art teacher (who is a cool guy and would probably be devastated to know this is the first thing I recall when I think of him) was giving us a mini-lecture about needing to really stretch our creativity and try new things. He picked up a ball of clay, poked three holes in it, and said “see, anyone can make a face.” It was clearly in reference to my rather pathetic project because, well, it looked exactly the same. What I don’t know is why I was singled out like that.

Art was already on life support for me. I think that did it in.

Years later, in high school (I kept taking art classes, probably just for the credits), I had a truly awful troll of an art teacher. One time, she looked at something I had been drawing — and yes, it was indeed bad — and uttered “ugh, Grossman… gross!” Thanks, you old sow. Thanks so much for that.

“Don’t slump!”

My first-grade homeroom teacher made it a point on one of the first days of class to pull us all together and teach us about slumping over in one’s chair. Or slouching. I don’t remember which word she used, but she gave a demonstration and asked “have you ever seen an old person sit in a chair like this?” at which point she crumpled like a doll. “You don’t want to end up like that! Make sure to always sit up straight, because it’s hard to fix this once the damage is done!” Right she was. Unfortunately, since I’m at a desktop computer so much… well, yeah.

“We’re all inventors.”

A total dark horse candidate for things I’d remember from way-back-when, but this made an impact. I wish I could recall who said it to us. The details and context escape me, but the idea was that you don’t have to be creating new technologies to call yourself an inventor. Even as dumpy little students, choosing how to carry our textbooks and binders was an act of creation; we were all inventing when we did that.

We invent when we come up with creative ways to solve little problems at work; when we decorate our homes; when we decide who we are and how we’re going to act. That is, perhaps, unless you don’t have an ounce of existentialism in your body and you simply allow your animal instincts to carry you from one thing to the next. Those people are great fun to deal with.

In closing, teachers: your words, even your off-handed little remarks, can have a profound impact on your students. Be very mindful of what you say around them.

Home Sweet Home

Home Sweet Home

I guess Sass happened a few years ago and I missed the memo. That’s bad news for me because since I didn’t hug it, and pet it, and squeeze it with such love as soon as it appeared, I missed the total-newb tutorial train. Everyone’s already supposed to know everything about it by now, so all the advanced Sass techniques and integrations assume you do. After all, how could you not? …unless you’ve been living under a rock. Which I have.

I get what Sass does and I know Foundation makes heavy use of it for customization. When I realized I wanted Foundation to render rows wider than 1000 pixels by default, I knew it was time to adopt Sass. I simply had no idea how to do it for my current setup, which is Visual Studio 2013 Update 3, Web Essentials 2013 for Update 3, and Foundation 5.

In my travels, I kept seeing mention of something called Compass (I have no idea what it is or why I would need it), but according to what I’ve been reading, Web Essentials recently supplanted much of that tool’s usefulness in Visual Studio. Fine with me: the less bloat, the better. Unfortunately, the web development community at large hasn’t really caught up with this turn of events, so tutorials for Compass are still all over the place like it’s the only option for this particular quest. And it’s not.

Without further ado, I will describe here the steps I followed in order to customize Foundation 5 via Sass in a new ASP.NET MVC 5 Web Application through Visual Studio 2013 Update 3 with Web Essentials 2013 for Update 3 installed.

  1. In Visual Studio, FILE → New → Project… → Installed → Templates → Visual C# → Web → ASP.NET Web Application → (name it whatever) → OK.
  2. MVC → OK.
  3. Right-click your new Web Application project in the Solution Explorer and select Manage NuGet Packages…
  4. Search for “foundation sass”. At the time of this writing, the most appropriate package was Zurb Foundation 5 (for Sites) Core Sass files. I guess you could alternatively do this in the Package Manager Console:
  5. Rename  /Content/Site.css to  /Content/Site.scss (CSS to SCSS) and replace its contents with the following, which puts a custom variable out there and then processes it against the core Foundation SCSS files to create a compiled CSS file:

    Let me briefly explain what’s going on here…

    • Line 4: If you don’t have this line, you can’t do stuff like rem-calc() in your customizations… which, as it turns out, is exactly what I need to widen the rows. This crucial little tidbit stole an hour of my life. It’s mentioned in the documentation, but it should just be there by default. I’ll explain the pathing in a sec.
    • Line 6: That’s me doing what I came here to do: I want Foundation to take advantage of wider screens. Instead of limiting itself to 1000 pixels, I want 1200 pixels. Much better. Also, super secret unobvious magic: order matters!
    • Lines 8-10: These three files are what actually build the Foundation CSS. Similar to what happened on line 4, we have to point Web Essentials to the files using paths. You’ll notice that the /sass/foundation/Site.scss file (which we didn’t use in this scenario) doesn’t have pathing because all those files are in the same directory. It’s also missing the ever-important line 4, which is just cruel if you’re trying to use it as an example. Ahem.
  6. Saving Site.scss generates Site.css.

    Saving Site.scss generates Site.css.

    As soon as you save your modified Site.scss, Web Essentials will compile Site.css and stick it under Site.scss.

  7. Run your project now and you’ll see that Foundation has been applied to the default ASP.NET hello world page. It’s not the best test in the world, but it’s quick and it shows it’s working. Change 1200 to 700 or something and refresh to see the effects.


The $row-width setting I modified is just one of the many things you can customize. Check /sass/foundation/_settings.scss for more options. The official Foundation documentation explains a few of them on a per-feature basis, too.

It’s not that this is terribly difficult… I just couldn’t find it explained the way I needed given my varying levels of proficiency with these tools. Hope this helps someone save a few hours and tears.

The Foundation Icon Fonts 3 pack is pretty cool. Not the best selection, and way too many stupid “social & brand icons” (MySpace? Really?), but I figure if I’m going to use Foundation anyway, why not. And since I’m living in ASP.NET MVC land these days, the official way to go about adding them to my web application is to chuck them into a bundle. That’s a nice, clean way to keep things organized and optimized. So, I did it, but it didn’t work very well once pushed to Azure. The icons wouldn’t load and I got weird 404s and 500s… What gives?

Well, I spent more time than I’d care to admit trying to figure out why something I figured was going to be simple and easy… wasn’t. Here’s what I discovered it took to get those icons working in this particular environment, and I hope it saves someone a little time.


First things first, the files need to be in there, so you’ll want something like the structure I’ve got.

Then comes bundling. You could just throw it into your primary Foundation bundle, but here it is in its own. Line 10 is the real magic because of the CssRewriteUrlTransform added to Include(). It’s kind of a big deal because it forces any URLs in your CSS file to cooperate with the MVC routing. And for being so crucial, it shouldn’t have been so hard to find.

Then make sure you actually call that bundle in your BundleConfig.cs:

Same deal in your _Layout.cshtml or wherever else you may want to do it:

And finally, one more “guess the password” type of requirement (that’s my way of saying you’d probably never, ever figure it out unless someone shared it with you). In your Web.config, you need to add these MIME mappings so everything will load correctly across all browsers. Why you have to explicitly set this instead of it being default behavior is stupid and beyond my comprehension:

Happy Happy Joy Joy

There you have it. After I did those magical things and published to Azure, the icons showed up. Ridiculous.

JSON Visualizer

Kind of needed that forever ago. But hey, no more external JSON viewers for me! Woo!

AMD CPUs run really, really hot.

AMD CPUs run really, really hot.

I recently upgraded the CPU on the media center PC in our living room so we could do a little gaming when we’re tired of watching shows and stuff. The upgrade went well except for the stock cooler that came with the CPU. For the amount of sound it made, we may as well have surrounded the case with box fans and taken a leaf blower to it as well for good measure. That thing was LOUD.

I’ve never really done the aftermarket cooler thing because it’s a pain in the ass. Ripping the machine open and performing brain surgery is enough without also having to screw around with thermal paste and most likely take the whole motherboard out just for a fancy cooler. Stock’s fine, thanks. Except now it wasn’t, and I had to do something.

I ordered a Cooler Master Hyper 212 EVO because it has lots of really good reviews and seems like a safe bet. When it got here… man, I knew it was going to be tall, but it was really tall. As in I wasn’t sure I’d be able to close the case with it in there. I soldiered on though, hoping that once it was secured onto the chip, everything would be tight but alright. So out came the motherboard, off came the old thermal paste, and so forth… and yeah, no, I couldn’t close the case.



What now? Well, if you look at the heatsink, you can see 8 little copper nubs sticking out the top of it. These nubs were the only thing preventing me from closing the case — if they weren’t there, everything would be great. And so, convinced I was awesome enough to do this kind of thing after four years of generally successful home improvement projects, I took a hacksaw to the little bastards and extracted them.

A half hour or so later, I gave myself a pat myself on the back as I slid the side cover back onto the case. Score! I’m so good. After a few minutes of uptime, however, the machine shut itself off without warning. It had overheated. Hmm, that’s odd. Wonder what I did wrong?

I spent until 5:00 AM that night (morning?) trying to fix the problem. I probably cleaned and reapplied the thermal paste like six times, thinking each time I must have done a bad job that last time and that this time would be it. Nope. How about the BIOS? Maybe the fan speed is too low? Nope. I eventually concluded that I was doing everything quite correctly and that it had to be something else.

Could it be those copper tubes? Naw! They’re just pieces of copper bent in such a way that they help conduct the heat! Right? …right?

GeniusIt was, of course, the copper tubes. Butchering them eliminated a key component of the cooler according to this article I finally found. So that kind of sucked.

In the end, that cooler went in the trash and I ended up using a Logisys MC2002GX instead. It was just short enough to fit, it works, and it’s nice and quiet. But yeah, don’t mess with those damn copper tubes.