I Am Not Myself


Category Archives: Random

Source of All that Great Music

If you were ever curious where I get the music for most of my videos, I tend to start with The Kleptones and end with Mash-Up Your Bootz. The Kleptones always have great tunes, and most people on the internet have probably already heard them. Mash-Up Your Bootz on the other hand is a mixed bag, be prepared to rummage through some horrible crap before finding something amazing. You gotta dig, bro.

My current favorite.

Node.js It’s Not Just for Websites

So I have been working on a node.js project recently, that I was hosting on Heroku. Sadly, Heroku doesn’t allow socket.io based node apps to use true websockets. So I asked my good friend Adron who was the best Heroku-like node host out there that did support it. He suggested Nodejitsu.

So I signed up and my hopes were immediately dashed when I discovered they are metering access to their beta. You have to camp out on their activation site waiting for them to allot a few more activations. This sounded boring. So I decided to automate it with node of course. I fired up Sublime Text 2 and ripped this out.

var util = require('util'),
    exec = require('child_process').exec,
    rest = require('restler');

var alertMe = function(){
	exec('say -v Cellos Bobby, come get your nodejitsu beta');

var checkSite = function(){
	util.puts('checking if I can get you into the beta yet.');
	rest.get('http://activate.nodejitsu.com/').on('complete', function(result){
		if(result instanceof Error) {
			util.puts('Error: ' + result.message);
		} else {
			if(result.indexOf('We\'ve hit our limit today. Please try again later.') < 0)
				util.puts('damn it...');

var pollingSite = setInterval(checkSite, 10000);

Yes this script hits the website every 10 seconds checking to see if the limit message is not on the page and play a message if it is not. I was sufficiently amused by this that I gisted it and posted to twitter. Funny thing is with in a minute I had been retweeted by Joshua Holbrook the support lead for Nodejitsu and got the following response from NodeKohai the IRC bot for the Nodejistu channel.

@NotMyself Very nice! Now come join ‪#nodejitsu‬ on freenode to claim your prize!

You see sometimes being a smart ass is a bonus. It gets you free things! Also here is a quick video showing the script in action.

PowerShell, msysgit 1.7.9 and Permission denied (publickey) Errors

TLDR: Add “$env:home = resolve-path ~” to your PowerShell profile.

I recently updated my work Virtual Machine to the latest release of msysgit 1.7.9 to resolve some issues I was having with global settings not being obeyed. After the installation I noticed that I was no longer able to update repositories from PowerShell. The output I was getting looked something like this:

GIT [dirkdiggler] on [master] (clean) | C:\projects\foo
-> git pull
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

This was unexpected and the first thing I thought of was the recent security issue with GitHub, and maybe my work key needed to be validated. I checked GitHub and everything seemed to be set up correctly. I even went so far as to generate new keys with no success.

Next up, it occurred to me to try connecting via git bash.

dirkdiggler@DIRKDIGGLER-VM /c/projects/foo (master)
$ ssh git@github.com
Hi dirkdiggler! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.

Bash seems to be working fine. I then started troubleshooting my connection from PowerShell. I tried testing ssh first with the following command.

GIT [dirkdiggler] on [master] (clean) | C:\projects\foo
-> ssh git@github.com
Permission denied (publickey).

So it looks like the problem was not with git but with establishing an ssh connection to GitHub. I wanted to see exactly what was happening when trying to connect via ssh, so I ran the following command with enables verbose logging of the connection.

GIT [dirkdiggler] on [master] (clean) | C:\projects\foo
-> <b>ssh -v git@github.com</b>
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Connecting to github.com [] port 22.
debug1: Connection established.
debug1: identity file /.ssh/identity type -1
debug1: identity file /.ssh/id_rsa type -1
debug1: identity file /.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5github2
debug1: match: OpenSSH_5.1p1 Debian-5github2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /.ssh/identity
debug1: Trying private key: /.ssh/id_rsa
debug1: Trying private key: /.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey).

This output did not give me any immediate ideas on the problem but I thought I might try the same command from git bash. I won’t include the full output here, but I did notice something different right away. Check out the following lines from the output. Compare them to lines 6-8 above.

debug1: identity file /c/Users/MGALFAPAIR/.ssh/identity type -1
debug1: identity file /c/Users/MGALFAPAIR/.ssh/id_rsa type 1
debug1: identity file /c/Users/MGALFAPAIR/.ssh/id_dsa type -1

So it looks like ssh running under PowerShell is looking for my public/private key pair in a different directory than under bash. Doing a quick google search I found that an environment variable named home is used when determining the path to look for keys. I went back to PowerShell and checked for the environment variable like so.

GIT [dirkdiggler] on [master] (clean) | C:\projects\foo
-> Write-Host $env:home

No home variable set. So I set it like so.

GIT [dirkdiggler] on [master] (clean) | C:\projects\foo
-> $env:home = Resolve-Path ~

GIT [dirkdiggler] on [master] (clean) | C:\projects\foo
-> Write-Host $env:home

Running the ssh test again, I am now able to connect. Adding the command to my PowerShell profile sets it automatically every time I start PowerShell resolving the problem completely.

Introducing the Coding Solo Cowboy Hat of Shame

While at Agile Open Northwest, someone mentioned the best idea I have ever heard. Their team made a rule that if you were going to code by yourself with out a pairing partner you had to raise your hand and announce “I’m coding alone!” and don the Cowboy Hat of Shame.

This was such a great idea, my team decided to implement our own and here it is. The tiara really makes it work.



Corey Haines: You are unwise to lower your defenses!


Why does Paint.NET not have a stroke selection? Seriously, WTF!?!

Random Interesting Things From Around the Development Community

Over the last week several things have caught my interest and I wanted to share them with folks who might not look in the same nooks and crannies that I do for technical information.

First up is the .NET Automation with Rake and Albacore video up on TekPub by my friend Liam McLennan. Liam is one of the people I keep an eye on because he is doing things I wish I had the talent and resources to do myself. I had the pleasure of meeting him last year at ALT.NET Seattle and Seattle Code Camp. You might remember his Craftsmanship Tour videos from around that time where he broke out of his comfort zone and visited Obtiva and 8th Light as a journeyman. Liam is also from Australia, which means he speaks better English than I and can prolly drink me under the table. That makes him an alright guy in my book.

Next, comes a really thought provoking blog post by Clay Shirky titled The Collapse of Complex Business Models. I caught this post via a tweet from @cbilson. I have never read Clay before, but added him to my RSS feed after reading this post. It is a practical explanation that validates something that has been a gut feeling of mine for a very long time. The more complex a system becomes the more resistant to change it becomes as well. This applies to code, processes, business models and civilizations. Clay breaks the concept down really well. It is worth a read.

Finally, I want to give a nod to Zed Shaw for the excellent essay titled Products For People Who Make Products For People. Zed is not a .NET developer, in fact he might even sneer at us a bit for proclaiming we are. But that sneer isn’t really about you or I, it is more about the punk rock aesthetic of the developer community Zed runs with. He has an interesting perspective on value, quality and productivity that our community does not hear enough. Take a few minutes and read the post, you might learn something about yourself.

One final thought, what friction do you have in your development environment right now? What are you doing to resolve it? Where are you looking for technical solutions? Does what you are working on right now leave you feeling fulfilled? Are you happy? What are you going to do about it?

Drive: The Surprising Truth About What Motivates Us

This just popped up on Twitter a few minutes ago and it is a brilliant break down on motivation. Everyone who manages people should watch this.

My April Fools Day Prank

Slipped this into my application sometime last week. Wonder when my users will notice.

$(document).keyup(function() {
        $("#strobie").css("background-color", getRandomColor());

function getRandomColor() {
    var random = Math.round(0xffffff * Math.random());
    return ('#0' + random.toString(16)).replace(/^#0([0-9a-f]{6})$/i, '#$1');

function itIsAprilFoolsDay() {
    var today = new Date();
    return today.getMonth() == 3 && today.getDate() == 1;


Explain Phishing to Your Grandma

Excellent PSA that I found by way of The Consumerist. Original source.

MVC Public Service Announcement Video Series

ASP.NET MVC is all the rage right now in the .NET space. But did you know that MVC is a pattern that has been around for decades? And there are other communities of developers that have been using it to produce websites for years. Here are a set of videos from the Ruby on Rails community about the common pitfalls in MVC development.