Manjunath part 1

“What shall I get you sir?”, was the question which brought manjunath back from the depths of his memories to his present. Frank had been working as a waiter in this prestigious bank for the past 4 years and often knew that his boss, an eccentric Indian, was quite a random person(actually he always felt manjunath was an indecisive prick!) and can never decide what drink to order. Manjunath looked startled…as if woken up from a dream(read nightmare) and asked for a cup of tea. Manju thought having tea will refresh him and take him away from his nightmare and frank thought he was just trying to be “British”.
Manju was now suddenly aware of his environment. His luxurious office on the 43rd floor on canary wharf, London’s prime location. He saw outside the office and was able to see this big city, flooded with people, flooded with dreams. So many dreams came true everyday in this busy city and many more died of hunger. Manju had come a long way from a remote village in Eastern India to head of treasury in one of europe’s most respected bank. It was indeed a dream for him. He was a role model (of course for people who didn’t know him)
Suddenly, frank appeared with tea and Manju realised he was hungry. He inquired with utmost respect to frank if there was anything available at all? Frank, like a good butler, replied…”anything you want sir”.Had manju been philosophical, he would have pondered over the reply and discovered that frank indeed was not powerful enough to get him “anything“ he wants. But then hunger took over him and he ordered a sandwich.

Manju had a country home in Edinburgh not only because he was a huge Sean Connery fan but also because he had got this home very cheap from a seller in need. Suddenly, like a good urban high society professional banker, he felt the need to “unwind” himself and hence went over to the Scottish capital. A large penthouse with all amenities was really helpful in unwinding. Manju caught up on all the TV shows he had missed because of “work” and “professional commitments”.He also “revisited” his hobby of cooking by holding the utensil while his cook prepared a good Indian meal(oil free and roasted) for him. Thoroughly satisfied by the progress of his “unwinding” Saturday, he decided to retire for the day.

Manju for some reason was not able to sleep. He tried a lot but just wasn’t. He had almost decided to change the bed for its lack of comfort when he decided to take some fresh air.He went to the balcony and started staring at the stars and then the garden of his house. The street was completely empty and there was complete silence. Manju was almost able to head his heart beat. It was this moment, that he saw her. She was standing right in front of the main gate. No movement and standing still like a cadaver. It was pitch dark but he knew who it was Radhika. Manju was so frightened that he didn’t move. He was not able to think as his brain was asking him the question..how can I see someone who has died 5 years ago ?
Manjunath med radhika while studying Mumbai. Radhika was not a batchmate of Manju in IIT, she was infact the daughter of Manu Kaka, the tea stall owner, near the hostel of IIT Mumbai.
Manjunath, when first time went for the tea, he saw radhika and that was the moment, he had waited all his life. He felt as if the search has ended and he has found what he had always longed for. Manju had finally found the ‘masala tea’ he always wanted but never got outside his home.
He had decided he will come here everyday! When Manju first saw radhika, he completely ignored her. He took no notice of her and she took no notice of him.Manu kaka was running the tea stall for a while and now was planning to convert it into a snack bar. Radhika was helping her dad. She had completed HSC and was good with numbers.
Radhika was a fair girl, with long hairs. She had pitch dark black eyes and had a very cute dimple when she smiled. She always had the habit of keeping some strands of her hair to the front of her ears. She wasn’t tall and generally wore no makeup.

Manju woke up with a jerk. His happiness knew no bounds when he saw himself on the bed of his “country side” home. It was a nightmare! He wiped the sweat off his forehead and made himself some tea. He then thought of going fishing that day but later abandoned the idea.
He started for London late evening and his mind, post unwinding, was only focused on the meeting he had in Brussels next Tuesday.

The week was very busy as expected and Manju had to unexpectedly travel to Berlin from Brussels for an urgent review meeting. He came back on Friday late evening to his home. Tired and Hungry, Manju was miserable when his saviour Frank appeared. He had what it seemed like a very savoury kebab. Frank was a tall and lean guy, middle aged with very little hairs on his head. He was always smiling but in his head, he was always judging.
Manju was pretty fond of Frank but Frank detested Manju. For manju, Frank’s services as butler was the only homely feeling he had in this city of dreams. For frank, working for Manju was a compulsion and he hated his job as everyone in the world!
Manju knew about frank’s feelings towards him and he felt bad. He always wondered, “what have I done to make him hate me?”. Alas! the answer was with frank and was so so simple. Frank hated Manjunath because he smelt very bad!
At the moment though, Manjunath was only interested in the Kebabs and did not care how Frank felt about him. Frank served him the kebab and poured some wine for him. Manju thought, if god existed, he must be a butler!
The moment he took a sip of wine, manju spit it out in disgust! It was very very bitter and tasted like cow piss!

The room was painted with while. The lights were white and Manju’s dress was white. There was complete silence. The only failt sound was of some kind of motor whirring.
The person standing in front had a badge with name “Robert” written on it and was asking “Dr. Smith, why did you spit the cough syrup sir ?”

Randomness

I am all alone, as I whine
and everything seems fine,
the sun hasn’t lost its shine,
the poems haven’t lost their rhyme,
the music hasn’t lost its chime
the world hasn’t lost its crime
and everyone does look fine.
This is what I always wanted when you were mine…
Why then O dear so I whine ?
I am all alone, no one to bother, No one to answer,
Master of my wishes and time!

I am all alone, as I whine
But if everything does seems fine
Why then O dear do I fright ?
Why is sun no longer bright.
Why is melody no longer in sight
and why does nothing feels right ?

I am all alone, as I whine,
Master of my own time,
but why is the that time stopped ?
Flowers now smell of the rot
and spirit seems wrought
But everything does seem fine.

I am all alone, as I whine,
No soul to talk except mine,
No memories to ponder except thine,

Waiting for the eternal peace,
which I just saw dying…

The happiest man alive!

I had once read about a man who was celebrated as the happiest man alive. I was intrigued, how dd they decide it? What was the metric ?
Upon reading ore about the man, I discovered that he was suffering from a neurological disorder (i can’t pronounce or write the name of the disease as its super complex). I was shocked. So they claim that the happiest man alive is a man with a sick mind?
Upon further investigation, I figured that his actual problem was his mind was not able to comprehend that visual information it received. In short, he did not understand what he saw. Interestingly, one of the effect was that he was not able to recognise faces! But he was not mad so his mind, upon observing further details like a peculiarity on a face or voice of the person was able to recognise who the person was but never did his mind see the face of the person.
I felt interested as it was all very cool sounding but I still did not understand why was he the happiest man. I mean here is a man who cannot recognise his wife when he looked at her and he was the happiest man? But finally, I figured that the real problem was that he was fundamentally a machine. He felt no emotion when he saw his wife because he never saw!!! He recognised her when she spoke but he never saw. He can see the red color of the rose but never can exclaim at its beauty. He was a living machine with absolutely no emotions.

I felt terrible but still, why the happiest man? the answer was stunning, Here was a man who has lost emotions and cannot perceive faces,but he did not know it. He never knew that his eyesight or mind has as issue. He had lost so much that he failed to realise what he lost!! So he felt no regrets , no remorse and was super happy ever!!!
The happiest man alive!

Rails issues with Spring

So, I have been merrily using foreman in my development environment and have been very happy using the environment variables.
So recently I created a new rails project and followed the same mundane procedure and when I did the coveted

foreman start

it started working just fine and life went on!

Suddenly, I felt the urge to check something in the rails console and I called my friend

foreman run rails c

and it loaded. But when I queried, it gave me an error saying

"Permission denied for relation..."

After a bit of googling and a lot of swearing and cursing, I was filled with frustration as I had no clue what’s happening. Then, I realized that rails console was trying to access the DB not using the env variables I had set but using the default postgres user! Elementary, wasn’t it?
But the this was a shocker as I had no idea what to do now. I was almost ready to go to the church for solving this issue when spring came in my life! Not the season but the preloader gem which is now a default in rails.
As soon as I disabled spring using


spring stop

my rails console started working like before and life was happy again!

The correct way of solving the issue however is to create a `’config/spring.rb` file with contents


`Spring.watch '.env'`.

Hope it helps!

At.js with froala issue

At.js is a Javascript library for having Github like mentions in an app. The library is here. It’s a very good library and simple to use however when I tried it, it didn’t work out of the box for froala editor. The problem is At.js surrounds the range with spans and since WebKit browsers insert spans, the editor accepts spans only if

data-fr-verified=”true”

is set to true. So to counter this, when initiating the function, a small tweak is required.

$(‘.froala-view’).atwho({
at: “@”,
editableAtwhoQueryAttrs: {“data-fr-verified”: true},

data:[‘Peter’, ‘Tom’, ‘Anne’]
})

This should get it working as it did for me.

 

Reference: Github issue

 

Hope  it helps

Screen shot in Chrome Extension

Hi,
There are many chrome extensions to take a screenshot. But recently, I was working on a project where we had to build an extension and also were taking a screenshot. So apparently, chrome provides an API called ‘capturevisibletab’ (doc) and it works. While coding, I referred to this git repo which works perfectly.
But then, as we tested, we found the image was cropped when using a macbook retina display machine.
It took us a while to understand that this is because the devicepixelratio (window.devicePixelRatio) is 2 in a macbook(with retina) display and 1 in others and hence the issue.
Thus, we had to adjust for scale which we did not account for earlier and we referred to this code for adjusting it.

Will soon post our whole code for completeness but the logic is pretty clear from the above code.

Hope it helps !

Rails 4 authenticy token issue

Hi,

Recently I was working on a simple rails application (Rails 4) and I create a simple remote form for a model.

Things were fine but when I submit the form using javascript, it gave me an authenticity token error:

 ActionController::InvalidAuthenticityToken

I read up(googled) a bit and figured that one has to set crsf_meta_tags in layout and not doing this creates the issue. I thought I had missed it somehow but to my dismay it was there but still I had the issue !

The problem was that in normal forms(remote => false) , rails automatically sets the authenticity token but not so in remote forms. Now there can be many work arounds like suggested here.

But the most rails way ! of doing it is adding the following in application.rb:

config.action_view.embed_authenticity_token_in_remote_forms = true

Once you restart your server, voila ! it will work.

A good reading can be found here

Hope it helps !