If this blog helped you in any way, please donate a dollar here

Wednesday, December 14, 2016

Clash of Clans on laptop

Okay this seems to be a click-bait but really not. Android Developers would know how painful it is to get the default android emulator up and running, not considering the pain that eventually follows when the actual application begins to run. It takes ages for the emulator to run even in a decent configuration PC or MacBook.

Now, I wasn't sure this could be done until my sister brought up the topic. She plays Clash of Clans on her laptop! Wow!

So, I decided to google. I knew about genymotion but it's a paid service, and then here's one emulator which actually worked for me on Mac OSX - BlueStacks.

Check this out:


Pretty cool huh!?

Wednesday, December 7, 2016

Makkhichoose attempts to bring flights search

For a few days I noticed "hello from flights js" on my browser console. I would assume some rougue extension somewhere and ignored it to the point where it really got very annoying. I finally tracked down the extension to this: "gllmlkidgbagkcikijiljllpdloelocn"

To get the folder location of chrome extensions, according to this answer, I first checked out, chrome://version/ for my Profile Path.




I was able to track this down to being the Makkhichoose extension which I regularly use for tracking prices on various e-commerce websites, like amazon, paytm, shopclues, myntra and flipkart.

Okay... A moment of silence for me and my covert stinginess.

Now then that is over, we can proceed further. So apparently MakkhiChoose is trying out a new flights based comparison tool as well!

Here are a few samples:
console.log('hello from flights js');
// var mmt_domestic_page__previous_url='';
// function mmt_domestic_page_url_watcher(){

And for cleartrip as well:

//cleartrip parsing

var ct_domestic_page_load_checker_timer;

function ct_domestic_page_load_checker(){
console.log('executing load_checker');
var url_params=window.location.search.replace('?','').split('&').reduce(function(s,c){var t=c.split('=');s[t[0]]=t[1];return s;},{});
if( (url_params['page']=='loaded' && window.location.href.match('cleartrip.com/flights/results?') && ($('.loaderContainer:eq(-1)').css('display')=="none"))  ){
console.log(window.location.href);

 Also http://www.easemytrip.in/

      url: "http://emtxml.bookeasytrip.com/emtxml.asmx",
      processData: false,
      // url: "http://shades.makkhichoose.com/analytics/logextensionfeedback",
      data: xml_req,
      contentType: "application/soap+xml",


Seems like they are on to something!

In my bout of hacking their sources, I found a neat "What-is-my-IP" clone. Here it is:

curl "http://search.makkhichoose.com/getip"
Happy hacking!


Monday, December 5, 2016

Selenium ChromeDriver Install Script

Hello Folks,



As I was trying to instruct someone how to install Selenium Webdriver on OSX, I realised that there were no good scripts to automate this task. There were instructions, sure, but none of the were a copy and paste solution. Not that I encourage copy-paste, I found this rather inconvenient though.

So here's a script install selenium chromedriver for any unix osx or windows computers (assuming cygwin) -

In case, the github plugin did not work the URL is here:

https://gist.github.com/rghose/106ae71639c6f9ce9076a260a5614b94

Enjoy!

Thursday, November 24, 2016

Showing Images on the terminal

So I just found a post on Hacker News where someone installed FreeBSD on their Mac, apparently because of this cool terminal thingy called Terminology. It can apparently show images on the terminal, using something called the EFL (Enlightenment Foundation Libraries), which are basically a  set of graphics libraries on the Enlightenment Window Manager. Now being the lazy dude I am, I decided I am not going to spend hacking UEFI today, rather why not spend hacking iTerm instead? I know iTerm shows me beer emoji when I do brew installs.


So surely, there must be some way of showing images right?

Well here we go:


Right on! Here's the amazing script which does this: https://raw.githubusercontent.com/gnachman/iTerm2/master/tests/imgcat

Happy Hacking!

Friday, January 8, 2016

One line youtube video downloader

Okay, so this might be illegal in certain places. I just decided to try this out for fun, and here we have it, download youtube videos with 1 line of shell script (and some perl)

The script looks like this:
curl -H 'Upgrade-insecure-requests: 1' -H 'Cache-control: max-age=0' -H 'Accept-language: en-US,en;q=0.8,bn;q=0.6' -H 'Accept-encoding: gzip, deflate, sdch' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36' "https://www.youtube.com/watch?v=II3L1noJlYQ" | gunzip | egrep -o 'https%3A%2F%2F[^\.]*\.googlevideo.com%2F[^,\]*' | perl -pe 's/\%(\w\w)/chr hex $1/ge' | head -n1  | xargs wget -O out.video
One line.

Get it here: