Posts

Return Client Specific Response from the Same REST Endpoint in Spring 4

Image
This article is about my research related to the question which I posted on Stackoverflow -  https://stackoverflow.com/questions/44004602/return-client-specific-response-from-the-same-rest-endpoint-in-spring-4 I wanted a way to customize my response from a Spring Rest Controller based on the client which made the request. Client identification can be done via a lot of things, but I had to do it via the scopes. Now, the way I will have to eventually proceed is by creating separate end-points for the clients for unmentionable reasons whatsoever, but I couldn't help myself writing down here so that somebody might just find useful and a better use-case for it. So, here is what I wanted things to work. Let me draw a picture. That would really help to make you understand. Here are the three challenges for me to achieve this: How to get the scope in my code somewhere so that I can do something about it? I needed a way to to intercept/filter the JSON response that was sen...

एक नया साल फिर आया है|

मेरे जीवन कि पोथी के,   365   पन्ने लिखकर , कुछ किस्से ,   कुछ बातें करके, कुछ प्यारी सी यादें देकर ; कुछ खास   chapters   को लिखकर, करके कदमताल चला गया , एक और साल चला गया | कुछ अपने थे ,   कुछ सपने थे ,   कुछ अपनों के भी सपने थे , कुछ पूरे हुए ,   कुछ नहीं हुए ,   पर जो जो थे सब अपने थे ; जीवन के पहिये को धकेल ,   बनके भूतकाल चला गया, एक और साल चला गया | कुछ पा लेने की ख्वाहिश थी, कुछ बन जाने का सोचा था, जब पंडित जी के पास गए, तो सुना ग्रहों में लोचा था; यहाँ घिस घिस के मर गए और वो, मस्तानी चाल चला गया, एक और साल चला गया | कहते हैं जिंदगी सफर है एक, लोग आते जाते रहते हैं, कुछ नए मिले, कुछ छूट गए, पर याद सब आते रहते हैं; गहरे रिश्तों को झिन्झोड़कर, करके बेहाल चला गया, एक और साल चला गया | जो बिछुड गया वो बिछुड गया, कुछ नहीं मिला तो नहीं मिला, Garden   सूना नहीं होता है, जो एक फूल कोई नहीं खिला; सब शिकवों, गिलों को दफनाकर फिर मैंने कदम बढ़ाया है, एक नया साल फिर आया है | कहते हैं जो...

Masks

People use masks to hide from the world Many use masks to cover their true selves Some uses masks to hide what’s underneath Almost everyone uses masks over their faces You can tell that people are wearing masks by looking into their eyes Their eyes are glazed over in broken spirit Their eyes are dulled from the pain Their eyes don’t hold any spark of what they had before Their eyes is like eye of a corpse You can tell that people are wearing masks By being their friends When you watch them its like watching a robot When they smile it doesn’t reach their eyes When they laugh its like a mocking cackle Their movements are cautious and lithe Their body language responds to every sound, and touch Whatever they do, it matches the mask they have on The main masks for people to use are: Happiness, because they don’t have it Alertness, because they don’t want to endure what they’ve been through again Shyness, because they fear others The most common mask is: Blank, nothing, no emotions what-so...

An apt quote

I feel like I am not anyone's first choice. Neither their favourite. Even if people tell me I'm important to them or I mean a lot to them, I know there is always someone they prefer to be with. Someone they chose over me. And that's hurt... a lot.

Truely IIM

Lynx today showed me a video of IIMA which showcases the infrastructure and facilities and life and social culture of IIMA. Its truly a wonderful video and the Alumni folks who prepared it did true justice to it. Kudos to them to for taking time out of their busy schedules to think and present something of this sort. They actually make time for it by bunking some lectures and dedicated night outs for it. Congratulations to the entire team for a job well done and a truly deserved one. (I will link the video here when I have it handy). But then, this is my blog and not a single perspective till now. Going off the topic here, but I will surely agree with Samar that he ignited fires of perspective and philosophy in our hearts and today we are really getting good at it. Sorry if that makes you feel a little insecure and I would always be thankful and grateful for this precious gift among so many others. OK, back to perspective. After seeing the video, a simple straight question came to my...

The Wish

Happy birthday, my friend I hope you have a happy one One filled with love and happiness But I know that you are missing someone Someone special to you Someone who you wish is there with you now So I give you a gift A simple one, really But I know that a gift you'd really enjoy Is to be with your special someone But this will have to do for now This mere piece of poetry But if you think about it Contemplate it deeply Think it through Looking into your mind Around every corner You'd see it The many gifts you receive Each so valuable and precious Tenderly given to you As if taking your hand And placing their heart Into your palm Indeed, that is what it is Their hearts to you From far away they give They give their emotions Their feelings And their minds They think so fondly of you And they hold your feelings Like a treasured jewel And what they give... Love, care, affection ...is more precious than what I can give

Ignored

Deep in thought, Not really there. I wonder why people don't care. Wondering why they just stop and stare. Sometimes I think it isn't fair. They Look at me like some kind of freak, Every time I go to speak. They love to chat, they love to glisten, but when it comes to me they just don't listen. like I"m a ghost, like I'm the wind, They ignore me like I was sinned. ~ sweetydusty

Lost a Friend

This poem here has a lot of resemblance in my life and I feel the poetess went through exactly the same, as I just went recently. Signing off with the friend with it. I guess I too should move on. What ever happened to the good old days When we used to be the best of friends? We would have fun and hang out. But it’s true what they say, All good things must come to an end. I was always there for you, And you were always there for me. We shared secrets and told each other everything. But now all that is left are the memories. I don’t understand why we lost contact, I don’t understand why it’s been over a year since we hung out. Don’t make the excuse we’re always too busy And that our schedules don’t work out. I feel left out! I feel like my best friend died. Was it really because of busy schedules or was it over a guy? I know people change and drift apart, But if something is important enough a person will do anything to work it out. So apparently you’ve moved...

Shackles

Shackles, I feel shackled by laws, rules, fear. These shackles restrain my actions, I am told its for the best, they prevent me from doing wrong, and keep me from wandering astray. Shackles protect me from danger, as I am not the only one chained, others are bound by shackles, their reach to me constricted. I dare not break these shackles as some bound are vicious beast, however others are gentle creatures, who's kindness the shackles hide. Their kindness I cannot see, they are locked away by shackles, and I realize, so am I. Chained by these shackles for ages I grow weak, locked away in this cellar I become naive, I cannot face beast that have broken, and I shun the kindness from the others. I feel uncomfortable with these shackles, I realize they are so tight they hurt, the chains spiral around, entrapping me. With these shackles I am stuck, drowning in an ocean of cowardice, I suffocate from fear, I feel I can't do anything, I decide, no more, no more shackles, I wish to br...

Please understand

Disclaimer: When you are reading this keep you mind open and think from the perspective presented. Your perspective is not wrong, but just agree to disagree because mine too is not wrong. Its lynx's bday and god knows how much I looked forward to it. Nothing better celebrating your sister's first night cake cutting ceremony and that's why its more special. And due to some unexpected scenarios it all got delayed. Everyone were disappointed, but nothing matched to my disappointment levels. And I am a big time jackass to take things in a bit too harsh way. Its either this way or that way. Binary is my most favourite language. But its good for computers, not practical life. So when Sam once said to me I being too straight at times is a blessing in disguise, I knew exactly what she meant. And when I feel disappointed, rather than being manipulative and presenting a better and middle path, I kind of blurt out. And mostly it happens I say things which make things worse. And t...

Happy Holi

It's Holi today and yes, of course, Happy Holi to everyone. But for me, I don't like this festival. I just hate it anything. Agreed its color of festivals and you need to forget the differences between people. Just like colors when brought together makes a great artwork. But the colors need to be in appropriate proportions. And an artist when creating masterpiece, balances them well and in a discipline. I am sorry, but the meanings of the true Holi have lost their significance, entirely. Yes entirely . Today, its all about, how to behave in the most weirdest and craziest way possible. The more, the better. Try to color someone with such a color, that it lasts longer than anything...eternity. Or it's an opportunity to color a girl whom guys look through the backgrounds. Is it an occasion of meaning or just an opportunity to have a crack at a girl; a day when somebody thinks why did he played holi and with what color he played; or a day of another holiday. And so I don...

Forbidden

You always want what you can't have It's there within reach yet it's untouchable The yearn and the want for the forbidden equalized by The fear and uncertainty of the forbidden Do you give into the temptation or Do you fight it daily and nightly Haunting images of what could be tease you as you sleep The ache felt every morning when you awaken Dulled only by preocuppying the mind but the heart and body still feel that ache Forbidden fruit tastes the best but do you dare tempt fate and push that hand forward and clutch that fruit to your bossom And now the question before you: Do you let passion conquer or Do you fight the forbidden --  poetic-dragon

Re-sizing multiple images on Linux

Every time when I have some task which is quite laboriousness and requires a lot of manual intervention, I think of some sort of automation. I think that because what I have understood during all my digital experience, that I am not the first one to be hit by these kind of boulders all along. At the same time, I am also not the only one who thinks that way when they are challenged with things like these. And finally, a lot of those people are way more smarter than I am for solving these problems. And what's even more better is, they share their learning and experiences. I just love the open source family... :k Right, back to this post. Recently, my sister got married and as expected, a lot of pics were captured. I had specifically bought Nikon L810 for it, and god, what images does it capture. But, you can't upload those high -resolution images for sharing with your friends. That's about 10G of images and in countries like mine, that size is a pretty high volume. So...

SVN Setup on Linux Box

Create the Repository sudo svnadmin create /var/svn/repositories/test Allow the Apache to read and write to the repository sudo chown -R www-data:www-data /var/svn/repositories/test Create the permissions file with the first user. sudo htpasswd -c /etc/subversion/passwd dragon Subsequent users can be added by same command WITHOUT the -c option. Edit the apache2.conf file sudo gedit /etc/apache2/apache2.conf <Location /svn> DAV svn SVNParentPath /var/svn/repositories/ SVNListParentPath On AuthType Basic AuthName "Test" AuthUserFile /etc/subversion/passwd <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user </LimitExcept> </Location>

Forgotten Friend

I waited for a voice to call out my name It didn't have to be soft and gentle But i stood there in the darkness Waiting alone,no light,not even a candle But then there you were, stretching your hand Telling me to come towards the light When you pulled me up i knew then that I had made a true friend that night Years went by,we grew so close You were my best friend so loyal But,when they all came along Your trust turned into betrayal You left me out, you went with them You were in another world You were never here, but that doesn't matter For once again I'm in darkness, I'm that girl Surrounded by these four walls I wonder how this happened to me again I continue wondering but then i remember, That I'm just a forgotten friend -- By mishi101

Late Night Shayari

 बड़ी प्यारी सी थी वो मुस्कराहट जो देख के किसी अपने को आई, हम तो इसके मायने ही खो बैठे थे जब तलक चेहरे पे नहीं आई, एक मर्तबा हो चूका था दीदार को पर जब आई तो दिल खोल के आई, अभी तो हुआ न एक पल भी और ये पूरी एक उम्र जी आई, बाँधा फिर हमने आशाओं की लहर को वापस वही चौराहे पर ले आई, चल पड़े फिर कदम अपने अपने रस्ते सोचते की ज़िन्दगी इस गली क्यूँ चली आई।।। ग़मों  के इस गहरे साये में एक उम्मीद की किरण ढूँढता हूँ, सूखा सा पड़ा है यह चेहरा एक मुस्कराहट ढूँढता हूँ, अब तो नकाब सा बन गया है हर चेहरा मैं एक अक्स ढूँढता हूँ, इन नकाब के पुतलों में एक वो ज़मीर ढूँढता हूँ, वो ज़मीर जो सोया हुआ है;जग जाए;चंद ऐसे शब्द ढूँढता हूँ, कह कर भी देखा है पर वो समझें ऐसे पल ढूँढता हूँ, अब ख्याल ही कब आया जो बयान किया वो ख्याल ढूँढता हूँ, ज़िन्दगी के इस मेले में खुदको खुदी में ढूँढता हूँ।।।

Make Tomcat Production Ready

I recently attending a training for Tomcat Performance and it was something really wonderful. The instructor, Ritesh Tyagi , gave insights to a lot of things that a developer should keep into mind while coding. At the very end of the session, he gave us things that one should look upon to make Tomcat ready for Production usage. Increase the Heap Size - This parameter you can decide based on how heavy is your application. You can configure this value in setenv.sh in the bin/ directory of your tomcat installation. Also, make sure these values are same so that the JVM does not have to spend time procesing for shrinking and growing of the Heap Size. Check more details here . export CATALINA_OPTS="-Xms512M -Xmx1024M" Use multiple Concurrent-Mark-Sweep-GC - If your application is very heavy and you occasionally face Out of Memory error, try setting the -XX:+UseConcMarkSweepGC option. This enables to run multiple (default 2) Concurrent Mark Sweep GC so that your ...
पहले  मैं बहुत तनाव में रहती थी ।  मेरे ऊपर काम का load  बहुत रहता था । मैं अपने घर वालों को टाइम भी नहीं दे पाती थी । अपने बच्चों के लिए tiffin  भी अच्छी तरह से नहीं बना पाती थी। पर जबसे मैंने webintel wics  use  किया है तब से दोस्तों मेरी life style  ही बदल गयी है । अब मैं मेरी  फॅमिली को पूरा टाइम दे पाती हूँ और  मेरे बच्चे के लिए भी बड़ा tiffin  तैयार कर पाती हूँ  मैं अब बहुत खुश हूँ दोस्तों । यह लाजवाब है ।

Pal

क्या खूब ये ज़िन्दगी के पल हैं कभी चेहरे पर मुस्कान तो कभी आँखें नम हैं  हर पल वो ज़हन में घर कर जाता हैं जिस पल में साथ तुम और हम हैं                                                -- DivineDr@g0n

The Secret Keeper by Typhoid Mary

When you have A burning secret, Don't you have an urge To leak it? Yes, why share is A mystery. But let me tell you My history. I never liked Having to hide. But knew I needed To stay inside. Because, if ever, I dared come out, The risk was too high Of things I could spout. If I weren't always Out of sight, Then I'd spill secrets Left and right. So, being isolated By my choice Seemed much safer Than using my voice. Because, like me, Others were weak. All their secrets, They needed to speak. So it came out, Out to me. I'm the keeper, Don't you see? I hold secrets Large and small. What I know Could make men fall. From petty theft To cheating flings, There's quite a variety Of things. Of course, these secrets I'd never say. I try to keep them Locked away. Let's hope I'm not Trying in vain, Because I can inflict Enormous pain. The information I keep concealed Could all too easily Become revealed. I can cause Loads of trouble: Strong foundations Smashed ...