npm scripts, Windows and Environment Variables - a hairy, hairy yak

The other day a Headspring colleague asked for help with an weird issue he was running setting up a Github Actions Workflow for Totem and he was getting this error when trying to run the app from within a npm script: Start-Process : Item has already been added. Key in dictionary: 'NPM_CONFIG_CACHE' Key being added: 'npm_config_cache' At line:1 char:1 + Start-Process 'dotnet' -nnw -argumentlist 'run -p ../Totem/Totem.cspr ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Start-Process], ArgumentException + FullyQualifiedErrorId : System.

Vice - A dark and colorful pygments style

My current project is a data sciency project in python which means I’ve been using IPython and Jupyter a lot. For a while now, my go to and favorite colorscheme/theme for coding is vim-vice. As I was working in this python project, I found out that IPython uses pygments for styling and syntax-highlighting. After looking for a pygments port of vim-vice and not founding one I decided to do the port myself: pygments-vice

Customer Service is about the customer, not you

As many of you, last night I was laying on my couch watching the latest Mad Men episode when suddenly it happened again, in the last 10 minutes of the show my TV screen goes blank. Same thing that happened last week. I’ve missed again the end of the episode. I was really pissed. So I did what everybody in the same situation would do, went to vent on twitter.As I expected, I got the usual “we are really sorry bla bla bla.

Git alias to delete all local branches

In my current project we have to use TFS as our remote repo. Locally I use git-tfs so that I can still be productive and do, ya know, work. Jimmy has a post describing in details the workflow that we use here but the TL;DR: version is: All work is done on local topic branches; You push to TFS from the topic branch; TFS, after running the build/tests, will commit the changes that were pushed; You pull the commited changes to master.


The announcement of the ASP.NET Web API got a lot of people interested in playing with, bending, learning the framework to see what was possible to do with it. Some folks were doing that already back when it was WCFWebApi. But the move to the ASP.NET team and having it being part of the ASP.NET MVC 4 beta definitely brought a lot of attention to the Web Api framework. The WebApiContrib organization With all that attention, and people playing with it, different contrib efforts were sparkling all around.

ASP.NET Web API Routing needs a hug

One of my goals with the WebAPIContrib is to be able to write as few code as possible in my API application and let the Contrib help me with the boring boilerplate code. Looking through the ASP.NET Web API samples, tutorials and blog posts out there, the first thing that jumps on my eye is the whole HttpResponseMessage noise. responseMessage.Headers.Location = new Uri(“”+person.Id); return responseMessage; }I don’t want to have to write all these status code and Location Header settings all over my code.

Extending ASP.NET Web API Content Negotiation

The ASP.NET team released the beta version of the ASP.NET Web API, previously known as WCF Web API, as part of the beta release of ASP.NET MVC 4. Having experience implementing web APIs with Restfulie, I was curious and decided to check how the ASP.NET Web API works to compare it with Restfulie. The first thing I noticed was a difference in the Content Negotiation implementation. I don’t intend to do a full comparison here, but to describe how to use one of the extension points in the Web API to add the behavior that I wanted.

Installing Less.css on OSX Lion

Today I was following the instructions to upgrade to the latest version of the Twitter Bootstrap. It’s pretty straight forward. It is really awesome, actually. All you have to do is: Open the terminal, pull the changes, run make. But, Twitter Bootstrap uses Less.css, so one of the steps of the update script is to compile the .less files into .css. I didn’t have less compiler installed on my MacBook Pro, so instead of successfully upgrading the Bootstrap, I got this on my terminal:

Running TeamCity on EC2

One of Headspring’s core mantras is to outsource everything that is not part of our core business. We are true believers on running the business in the cloud. We are even giving a talk about it. We use many cloud service providers on a daily basis. We use Google Apps for Email, Calendar, Voice and Intranet. We use Salesforce as our CRM. We use BitBucket to host our source code.

HotFix for Checkdisk hanging at 1 sec

I have a Dell Studio XPS 1640 running Windows 7 Home Premium x64. Yesterday it crashed (sigh) and when I rebooted the check disk was triggered. To my, not pleasant, surprise, Check Disk hanged at 1 sec left on the countdown for pressing a key to skip the disk check. Doing a hard reboot several times I was able to start windows again. Well, after some googling I found the HOTFIX KB 975778 that solved the issue like a charm for me.