how to change monitor input source from command line?

Hi all, I recently faced an interesting conundrum of having to connect a Macbook Pro and an Ubuntu desktop to the same monitor (Dell U3417W). I had to switch the monitor input source from Mac to Ubuntu and vice-versa frequently and the only way to do so was to physically press a bunch of buttons on the monitor. This got cumbersome pretty quickly and I wanted to find a niftier solution. I was already using the same keyboard and mouse to control both using synergy, so I started digging around and this post describes my findings.

Read more…

how to send html messages to hipchat from hubot ?

Hi all, our Mobile team at TripAdvisor started using HipChat mid last year for internal dev communication and it turned out to be a brilliant idea. It has simply changed the way we communicate, we no longer have to wait for other teams across the coast or continent to see an email and respond. 1-on-1 private chats/notifications prompt faster responses from fellow developers. In this post, I'm going to explain a hacky bridge that I built between XMPP based hubot and HipChat v2 API that allows one to send rich HTML messages to HipChat via hubot.

Read more…

how to fix the cryptic "Script error." in javascript ?

This tech post is related to a nagging JavaScript error that I debugged almost a year ago. If you look at any javascript error report, you will see a cryptic error polluting the reports under the name "Script error." without any information about the error. This happens in Firefox, Safari, and Chrome when an exception violates the browser's same-origin policy - i.e. when the error occurs in a script that's hosted on a domain other than the domain of the current page. This tech post details how you can fix this error and decrypt the error message.

Read more…

how to adjust monitor brightness from command line ?

Hi all, It's been an exciting few months for me. I graduated with a Masters from University of North Carolina at Chapel Hill and moved to Boston in order to work as a Software Engineer at TripAdvisor. In my first week at work, I shifted to a standing desk to avoid sitting for long hours. One of the first challenges I faced while working was how to constantly adjust my monitor brightness so that my eyes don't hurt. I had to lean forward awkwardly (due to the standing desk) to adjust the brightness manually. So, I started digging on how to build a small tool which would allow me to change the monitor brightness from command line and this post describes my findings.

Read more…

how to build a twitter sentiment analyzer ?

UPDATE: The github repo for twitter sentiment analyzer now contains updated get_twitter_data.py file compatible with Twitter API v1.1. It can be tested by placing appropriate oauth credentials in config.json and running test_twitter_data.py. You can create a new twitter app at https://dev.twitter.com/apps to fetch necessary oauth credentials.

Hi all, It's been almost a year since I last wrote a technical post. A lot of changes have occurred in my life since then, from a Frontend engineer at Yahoo!, I've transformed into a full-time graduate student at UNC-Chapel Hill who is moving to Redmond to do an internship at Microsoft this summer. In my spring semester, I took Data Mining course for which I had to complete a project as part of the course. After exploring various ideas, I finalized on building a Twitter Sentiment Analyzer. This project aimed to extract tweets about a particular topic from twitter (recency = 1-7 days) and analyze the opinion of tweeples (people who use twitter.com) on this topic as positive, negative or neutral. In this post, I will explain you how you can build such a sentiment analyzer. I will try to explain the concepts without making it sound too technical, but a good knowledge of machine learning classifiers really helps.

Read more…

how to implement infinite scrolling using native javascript and yui3 ?

Hi all, recently I had an opportunity to solve an interesting problem of implementing "infinite scrolling" or "continuous scrolling" or "endless scrolling" using native javascript and yui3. While I thought there was an existing solution for this problem, all of the solutions were pointing to jquery and none were using native javascript/yui3. Hence, I implemented a solution to solve the problem stated using native javascript and yui3.

Read more…