Tuesday, January 13, 2015

Lint in mouse :)

My wired mouse in home setup is as old as I started working from home for my employer. Suddenly this week the scroll wheel would scroll up fine but it would not scroll more than one page, you had to scroll up half page before it would resume scroll down. At first I thought its my Firefox upgrade but soon I noticed same issue in eclipse and terminal.  In evening I use the laptop without wired mouse and it would work fine. That led me to conclusion that issue is with mouse. 

In USA people have a replace mentality, if something is not working and cheap, you can replace it. I was this close to ordering a new mouse on amazon when I thought let me shake it to see if something is stuck, but nothing came out.  I then saw a small screw in bottom, I unscrew it and I hit the jackpot, I was like wth "Lint". My friend had similar issues with Lint in Iphone5 when his iphone wont charge and we used a breadtie to get out the lint and it was charging fine.

I was like yay problem solved and now mouse is working like new again.




Sunday, November 23, 2014

Webhooks and Integrating Aseembla svn commits with Pivotal tracker stories

I am intrigued by this webhook concept and it seems a very nice way for B2B communication.  Webhooks are powerful and it eliminates Poll for integrating with third parties. All you need is to have some REST api registered that will be called when an event occurs. A good e.g. of webhook for a cloud storage provider can be  "automatically print this document on registered printers when a file is dropped in this folder". Lets assume all the customer needs to do is register a webhook "http://xyz.foo.com/printer/xxd344/print?token=authTokenXXX and the cloud storage provider can then call this url and POST the body of document in input.

Recently I had a chance to play with webhooks when I was trying to move jenkins to EC2 for my friend and as part of it I moved his svn to assembla.com.  I saw webhooks and I thought I can integrate commits into svn hosted by assembla.com to pivotaltracker.com tickets.  It took just 1 hour to do it but it was fun, apparently there are post commit hooks that you can add in svn but this was much easier to do because assembla.com has a webhook concept https://helpdesk.assembla.com/customer/portal/articles/1607029-configuring-the-webhook-tool  so all I need to do is find a pivotal api that would allow to post commit messages to it.

It seems Pivotal tracker already has this https://www.pivotaltracker.com/help/api/rest/v5#source_commits_post  .  The challenge was that assembla webhook doesnt allow you to pass any custom header where I can pass the X-TrackerToken header but after some api documentation trolling I found that you can pass the token in query string like

https://www.pivotaltracker.com/services/v5/source_commits?token=sdfsdfdsfdsfdsfdsf  and I was done. After Configuring the integration the commit messages show up in pivotal story.