Search This Blog

Pages

Wednesday, September 8, 2021

Error with Hashicorp Vault for PostgreSQL dynamic credentials

 https://stackoverflow.com/questions/56363489/error-with-hashicorp-vault-for-postgresql-dynamic-credentials


Error during setup of clairctl for container scanning with clair

 https://devops.stackexchange.com/questions/5018/error-during-setup-of-clairctl-for-container-scanning-with-clair


Thursday, May 21, 2020

Daily confirmed COVID-19 deaths per million people

I think the most appropriate metric to compare effect of corona virus across countries is to see Daily confirmed COVID-19 deaths per million people by country.

This can be seen here: https://ourworldindata.org/grapher/new-covid-deaths-per-million?tab=chart&time=2020-05-20&country=BGD+BRA+CHN+DEU+IND+IRN+ITA+PAK+RUS+SGP+ZAF+ESP+LKA+THA+GBR+USA+OWID_WRL

Wednesday, May 20, 2020

How to test internet connectivity on Linux

Without ping

#!/bin/bash
wget -q --spider http://google.com
if [ $? -eq 0 ]; then
    echo "Online"
else
    echo "Offline"
fi

-q : Silence mode
--spider : don't get, just check page availability
$? : shell return code
0 : shell "All OK" code

Without wget

#!/bin/bash
echo -e "GET http://google.com HTTP/1.0\n\n" | nc google.com 80 > /dev/null 2>&1
if [ $? -eq 0 ]; then
    echo "Online"
else
    echo "Offline"
fi

Source: https://stackoverflow.com/a/26820300/490192

Monday, April 6, 2020

COVID-19 comparison across countries

This site provides very good charts where we can add countries and see a comparison of the COVID-19 situation in them. This link compares India with US, UK, Italy, Spain, China, South Korea and Japan

https://ourworldindata.org/grapher/total-cases-covid-19?country=CHN+IND+ITA+ESP+USA+KOR+JPN+GBR

Tuesday, February 4, 2020

How to check security vulnerabilities in your Node.js packages

npm i --package-lock-only
npm audit --registry=https://registry.npmjs.org

Reference: https://docs.npmjs.com/cli/audit

Monday, February 3, 2020

Budget 2020-21 - Income Tax - Which scheme is better - New or Old?


I calculated Income tax for different income levels with proposals in Budget for FY 2020-21 considering only two exemptions below for different income levels using this calculator: https://cleartax.in/paytax/taxcalculator.
  1. 1.5 lakh under Section 80C (investments)
  2. 25000 under 80D (medical insurance) 
I have not included the following exemptions allowed under Old scheme specifically - 
  1. Standard deduction of 50,000/- in Old scheme as it is available only to Salaried employees (NOT to businessmen, self-employed or retirees).
  2. Exemption for donations under Section 80G.
  3. Brought Forward Capital Gain Losses from earlier years.
  4. NPS under Section 80 CCD as most people do not opt for it due the 
    1. Lacking indexation benefit even though held for long.
    2. The compulsion to buy an annuity at retirement age
You can use the calculator https://cleartax.in/paytax/taxcalculator to calculate the tax for your specific case.

Results below.

Income
Which is better? (Old/New)
Difference
5 lakhs
Same
0
7.5 lakhs
Old
Rs. 10400/-
10 lakhs
Old
Rs. 2600/-
12.5 lakhs
Old
Rs. 10400/-
15 lakhs
New
Rs. 23,400/-
20 lakhs
New
Rs. 23,400/-
25 lakhs
New
Rs. 23,400/-
30 lakhs
New
Rs. 23,400/-
35 lakhs
New
Rs. 23,400/-
40 lakhs
New
Rs. 23,400/-

Important Note: Under Old plan, salaried employees can claim the standard deduction of Rs.50,000/- and so save a tax of Rs.15,600/-.

In this particular situation discussed above.
  • The old scheme is better if income is less than 15 lakh. The new scheme saves Rs.23,400/- for salary above 15 lakhs.
  • If you avail interest benefit of Rs.2 lakh from home loan, the Old scheme is always better.
Helpful articles

Tuesday, December 31, 2019

Jackson Java Deserialization Vulnerabilities


Very detailed information about the vulnerabilities is available here, here and here. To summarize, the java code is vulnerable if following strings are present in code:
  1. enableDefaultTyping
  2. @JsonTypeInfo (per-class annotations)

Wednesday, November 20, 2019

Education in mother tongue

https://thewire.in/education/andhra-pradesh-english-language

This is an excellent article having data about various studies, experiences of educational outcomes of studying in mother tongue.


ह्या लेखामध्ये मातृभाषेतून शिक्षणाबद्दल केलेल्या जगभरातील अनुभव, à¤…भ्यासांबद्दल छान माहिती आहे.

Another interesting article: https://thewire.in/education/why-children-should-learn-in-their-mother-tongue

Wednesday, November 6, 2019

NoSQL Primer


You could start from Post2, but the series provides an excellent overview of the current NoSQL landscape.


Post 1:

JUST SAY YES TO NOSQL PART I

Post 2:

EXPLORING THE DIFFERENT TYPES OF NOSQL DATABASES PART II

Post 3:


Friday, August 16, 2019

How to send email using SMTP and telnet prompt


telnet 25
ehlo sender.com
mail from: sgokhale@sender.com
rcpt to: sgokhale@receiver.com
data
subject: test mail from sender app
test email body
.

How to monitor ElasticSearch instance

$ curl http://:9200/_cat/indices
$ curl http://:9200/_cat/aliases
$ curl http://:9200/_cluster/_status

How to monitor Redis server

On a REDIS server

redis-cli -p 6379 -h info server

redis-cli -p 6379 -h set shashi gokhale

redis-cli -p 6379 -h get shashi

Sunday, June 9, 2019

Learnings about crypto currency for wealth

I recently got a chance to meet a friend who has studied the crypto currency scene for wealth creation. Points out of our discussion below:

https://cryptowat.ch/ for technical analysis
https://cryptopanic.com/ for News
https://koinex.in/ Indian exchange

Andreas Antonopoulos - Andreas M. Antonopoulos is a Greek-British bitcoin advocate. He is a host on the Let's Talk Bitcoin podcast and a teaching fellow for the M.Sc. Digital Currencies at the University of Nicosia

Ray Dalio - American philanthropist - Raymond Dalio is an American billionaire investor, hedge fund manager, and philanthropist. Dalio is the founder of investment firm Bridgewater Associates, one of the world's largest hedge funds. Bloomberg ranked him as the world's 58th wealthiest person in June 2019

Adam Khoo - Singaporean stock trading educator - adam-khoo.com Adam Khoo Yean Ann is a Singaporean entrepreneur, author, trainer and a stocks and FX trader. Khoo is the Executive chairman and Chief Master Trainer of Adam Khoo Learning Technologies Group

Trade Like a Casino for Consistent Profits by Adam Khoo - https://www.youtube.com/watch?v=bRCtBRsLPmk

https://traderscarnival.com/ - residential traders conference

https://www.exodus.io/ - Wallet - mobile as well as web based.

Why Bitcoin fears Quantum Computers?—?and IOTA doesn’t - https://hackernoon.com/why-bitcoin-fears-quantum-computers-and-iota-doesnt-697da531a11b?gi=f16f08f2d0fa

Wednesday, March 20, 2019

ISKCON books audiobooks download

http://www.krishnapath.org/free-ebooks-audiobooks-of-srila-prabhupada/

https://bhaktivedantavediclibrary.org/books/

Friday, March 15, 2019

Daniel Miessler's posts on Information Security

How to Build a Successful Career in Information Security / Cybersecurity | Daniel Miessler
https://danielmiessler.com/blog/build-successful-infosec-career/

60 Information Security Interview Questions [2019 Update] | Daniel Miessler
https://danielmiessler.com/study/infosec_interview_questions/

Encoding vs. Encryption vs. Hashing vs. Obfuscation
https://danielmiessler.com/study/encoding-encryption-hashing-obfuscation/

Let magic formula cast a spell on your investments

Famed value fund manager Joel Greenblatt compounded his fund by 30.8 per cent every year for 17 years using the magic formula. Here's his technique and how you can use it to improve your investment results - applied to Indian market. Fantastic indeed!

https://www.valueresearchonline.com/story/h2_storyview.asp?str=46691

Wednesday, February 15, 2017

Beginner's guide to mutual funds

The beginner investor's dangerous journey

https://www.valueresearchonline.com/story/h2_storyview.asp?str=28444

https://www.valueresearchonline.com/story/h2_storyview.asp?str=28444

Beginner's guide to mutual funds

https://www.valueresearchonline.com/story/h2_storyview.asp?str=32164

As a beginner, what funds should I choose?

https://www.valueresearchonline.com/story/h2_storyView.asp?str=32684

https://www.valueresearchonline.com/story/h2_storyView.asp?str=24561

https://www.valueresearchonline.com/story/h2_storyView.asp?str=10060

https://www.valueresearchonline.com/story/h2_storyView.asp?str=32895

https://www.valueresearchonline.com/story/h2_storyview.asp?str=28993

https://www.valueresearchonline.com/story/h2_storyview.asp?str=21999&&utm_medium=vro.in

Tax Saving

Saving tax through Mutual Funds

https://www.valueresearchonline.com/story/h2_storyView.asp?str=26859

Even the worst ELSS outperformed PPF over 15 years

https://advisor.moneylife.in/blog/article/even-the-worst-elss-outperformed-ppf-over-15-years/1512.html




Friday, September 30, 2016

Petrol vs CNG vs Diesel….What type of car to go for?

http://economydecoded.com/2013/01/petrol-vs-cng-vs-dieselwhat-type-of-car/

Tuesday, July 19, 2016

How to enable FINEST logging of SQL Server JDBC Driver

Add following code snippet in constructor of your class that serves as interface to the SQL Server JDBC driver which is typically where you pass the connection credentials of your SQL Server database.
===============
        java.util.logging.Logger jlogger = java.util.logging.Logger.getLogger("com.microsoft.sqlserver.jdbc");
        java.util.logging.FileHandler jfh;

        try
        {
            // This block configure the logger with handler and formatter
            jfh = new java.util.logging.FileHandler("C:/temp/java-sqljdbc-driver.log");
            jlogger.addHandler(jfh);
            java.util.logging.SimpleFormatter jformatter = new java.util.logging.SimpleFormatter();
            jfh.setFormatter(jformatter);
            jlogger.setLevel(java.util.logging.Level.FINEST);

            // the following statement is used to log any messages
            jlogger.info("MY FIRST TEST LOG MESSAGE");
        }
        catch (SecurityException e)
        {
            e.printStackTrace();
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }
===============

In above example the logging level is set to FINEST, but it can be set to FINE and FINER as well. On execution of your test program FINE level logging to file "C:/temp/java-sqljdbc-driver.log" is enabled. This file comes handy for debugging issues due to bugs in JDBC driver.

Thursday, May 19, 2016

E-book: How to retire early in India

Excellent - download the pdf ebook and take a look!
http://freefincal.com/e-book-retire-early-india/ 

Some home truths: Highs and lows of the realty sector

 Read more: http://forbesindia.com/article/real-estate-special/some-home-truths-highs-and-lows-of-the-realty-sector/43175/1#ixzz494tgYh3Z

Tuesday, May 17, 2016

CPI in India from 1980 to 2015: 8.23

Interesting data - the average consumer price inflation (CPI) in India from 1980 to 2015 comes out to be 8.23. Useful data for personal financial planning.

https://data.oecd.org/chart/4x2A

Friday, October 30, 2015

How Lenovo named their smartphone series

Lenovo officials explained how they came up with the K, S, P and A series names for their phones. 

"K" is derived from the word "GeeK", which indicate these are high-end phones meant for geeks. 

The series "S" indicates "Style", fashion and trendy! 

"P" series stands for "Professional", indicating these phones are professionals and business people offering a long battery life and dual SIM capability. 

Finally, the "A" series stands for "Affordable", which are price sensitive, budge phones.

Source: http://www.techulator.com/resources/7891-Lenovo-launches-series-new-smartphones-India.aspx

Tuesday, July 21, 2015

आभा भागवत यांची कला या विषयावरील उत्कृष्ठ लेखमला

लेख क्र ७ - खास शिक्षक - १९ जुलै २०१५



लेख क्र ६ - कलेविषयी कळकळ असणारी माणसं - १२ जुलै २०१५



लेख क्र ५ - चिमुकल्यांची भित्तीचित्रांची कार्यशाळा - ५ जुलै २०१५



लेख क्र ४ - भिंतीवरची चित्र - २८ जून २०१५



लेख क्र ३ - सौंदर्यदृष्टी आणि सौंदर्यानुभव - २१ जून २०१५




लेख क्र २ - बालचित्रकलेतील अभिव्यक्तीचे टप्पे - १४ जून २०१५



लेख क्र १ - अभिव्यक्ती स्वातंत्र्याचा राजमार्ग - ७ जून २०१५

Monday, December 30, 2013

Best websites for electronic, mobile reviews, comparisons and price deals

Compare


Very detailed comparison can be done here: http://www.smartprix.com/mobiles/compare.php?ids=2335%2c3202%2c1101l70o9bl%2c11014p2rete. The highlight of this comparison is that it has a line about significance of each metric being compared and why having lower or upper value is good.

Review


Very detailed reviews can be found here: http://www.gsmarena.com/sony_xperia_m-review-973.php. Especially interesting is page 5 which has detailed performance reviews against its peers.

Search for best deal


Best deal can be found here: http://www.mysmartprice.com/mobile/sony-xperia-m-dual-msp2999?utm_medium=search&utm_source=Sony+Xperia+M+Dual. While this site is a deal aggregator, we can also observe trend. One observation is that things get cheap late evening on Friday every week (probably has something to do with weekly quotas...).

Buy! :)


Sunday, March 10, 2013

Sources of free audiobooks



This is a source of free audiobooks

English language:
Subscribe to newsletter from http://www.learnoutloud.com and they offer about one book for free per week.
http://librivox.org: community donated and copyright expired audio books

Marathi language:
http://boltipustake.blogspot.in/2011/01/blog-post.html : collection of community recorded audio books.

"राज्य मराठी विकास संस्था" :http://rmvs.maharashtra.gov.in/

Blog posts having more information:
http://www.digitaltrends.com/lifestyle/best-websites-for-free-audiobooks/

Wednesday, December 12, 2012

Quotables Quotes on Life

Faith is "Realizing" that you will always get what you need.

Drop things consciously that are low priority

Budget your time, time-box it.

Friday, November 23, 2012

Top 10 Gandhi Inspirational Quotes that Give You Power to Change the World

Are you inspired by Mahatma Gandhi? Gandhi quotes inspired millions of Indians to act in non-violent protest against British oppression. His own wisdom and philosophy can always inspire us. Here are the Gandhi’s Top 10 inspirational quotes that give you power to change the world.
1
First they ignore you. Then they laugh at you. Then they fight you. Then you win.
2
The weak can never forgive. Forgiveness is the attribute of the strong.
3
Happiness is when what you think, what you say, and what you do are in harmony.
4
A 'No' uttered from the deepest conviction is better than a 'Yes' merely uttered to please, or worse, to avoid trouble.
5
A coward is incapable of exhibiting love; it is the prerogative of the brave.
6
A man is but the product of his thoughts what he thinks, he becomes.
7
A nation's culture resides in the hearts and in the soul of its people.
8
Always aim at complete harmony of thought and word and deed. Always aim at purifying your thoughts and everything will be well.
9
An error does not become truth by reason of multiplied propagation, nor does truth become error because nobody sees it.
10
An ounce of practice is worth more than tons of preaching.

Friday, April 20, 2012

Great quotes on medicine

Cure rarely, comfort mostly, but console always - Hippocrates 


“One kind word can warm three winter months”—a Japanese saying


“Art” wrote, Henry David Thoreau, “is that which makes another man’s day”


“Know your patient better than his disease” was the opinion of the father of modern medicine, Hippocrates


“Patient care is caring for the patient!” This is the motto of Massachusetts General Hospital and was coined by Sir Francis Peabody


Platt had written in 1949 that “if one were to listen to the patient long enough, the patient would give away his/her diagnosis.”

The study showed that 80% of the accurate final diagnosis and 100% of the future management strategies could be arrived at, at the end of listening to the patient and reading the referral letter. This could only be refined 4% more by all the physical examinations and only 8% by all the investigations including the PET scanner! 


Courtesy: http://www.moneylife.in/article/bedside-medicine-a-forgotten-art/25067.html

Friday, February 24, 2012

Very good information on various regex special characters for java

http://www.leepoint.net/notes-java/data/strings/40regular_expressions/25sum-regex.html

Tuesday, January 31, 2012

Strange article in moneylife.in

I saw this strange article: http://www.moneylife.in/article/fidelitys-exit-a-slap-on-sebis-face/23340.html in moneylife today: I have always thought moneylife to be small investor's advocate. However this article seems to have confused me. I have given the comment given below to the article
===========================================================
Can moneylife explain why a lot of new AMC's are opening up MF businesses in India and only Fidelity is quitting it?

The article seems to show that moneylife has some grudge against SEBI (and unfortunately small investors)

I completely disagree with moneylife. I feel the statement "Investment advisors are neutral and usually give unbiased information" is about distributors. I do not agree to it. I have frankly never met an eager distributor who was unbiased. They used to keep on asking people to shuffle funds, always recommending selling of a fund bought sometime back and using the proceeds to purchased upcoming IPO's. Removing entry loads stopped misselling to a very large extent. In fact the AUM of good AMC's are increasing with regular investments from SIP (which are mostly long term).

The fact that on removal of entry load the distributors (IFA) moved to misselling of ULIP is ample proof of their intentions.

What proposal does moneylife have  to stop misselling of MF even in presence of entry load?

Friday, November 11, 2011

Best 11 questions Gallup scientists have found to ask customers anywhere in the world


Leaders have yet to learn that relationships trump price in almost all business circumstances, from hair salons to high-tech consulting. He who most deeply understands the customer's needs tends to win and always gets the highest margins. That's why talent and relationships can almost always beat low price -- they inspire customer engagement. To measure customer engagement, these are the best 11 questions Gallup scientists have found to ask customers anywhere in the world:
CE1. Taking into account all the products and services you receive from them, how satisfied are you with (Company) overall?
CE2. How likely are you to continue to do business with (Company)?
CE3. How likely are you to recommend (Company) to a friend or associate?
CE4. (Company) is a name I can always trust.
CE5. (Company) always delivers on what they promise.
CE6. (Company) always treats me fairly.
CE7. If a problem arises, I can always count on (Company) to reach a fair and satisfactory resolution.
CE8. I feel proud to be (a/an) (Company) customer.
CE9. (Company) always treats me with respect.
CE10. (Company) is the perfect company/product for people like me.
CE11. I can't imagine a world without (Company).

I think this is indeed a very good compilation!

Tuesday, November 1, 2011

Quotable Quotes on Money

Sep 29, 2012 - 5 minute wrapup
"Yearly figures, it should be noted, are neither to be ignored nor viewed as all-important. The pace of the earth's movement around the sun is not synchronized with the time required for either investment ideas or operating decisions to bear fruit." - Warren Buffett's 2010 letter to shareholders of Berkshire Hathaway

October 19, 2011 - 5 minute wrapup - 

"It takes character to sit there with all that cash and do nothing. I didn't get to where I am by going after mediocre opportunities." - Charles Munger 

20-Oct-2011 - 5 minute wrapup - 

"As I grow older, I pay less attention to what men say. I just watch what they do." - Andrew Carnegie 

29-Oct-2011 - 5 minute wrapup  - 

"Here's one truth that perhaps your typical investment counselor would disagree with: if you're comfortably rich and someone else is getting richer faster than you by, for example, investing in risky stocks, so what?! Someone will always be getting richer faster than you. This is not a tragedy." - Charlie Munger

29-Oct-2011 - Market Musings (M2) - 

"As I grow older, I pay less attention to what men say. I just watch what they do." - Andrew Carnegie

5-Nov-2011 - 5 minute wrapup - 

"If past history was all there was to the game, the richest people would be librarians." - Warren Buffett 

30-Apr-2011 5 minute wrapup - 
"Investing in stocks is an art, not a science, and people who've been trained to rigidly quantify everything have a big disadvantage. If stock picking could be quantified, you could rent time on the nearest Cray computer and make a fortune. But it doesn't work that way. All the math you need in the stock market you get in the fourth grade." - Peter Lynch

Tuesday, October 25, 2011

A simple counter/timer code in Java

It is a very common requirement to measure time taken by a particular method/function or block of code. The following simple timer can come handy:


long startTime = System.currentTimeMillis();
// Code block or method/function to time.
long endTime = System.currentTimeMillis();
System.out.println("Time taken: " + (endTime - startTime) + " milliseconds");

The accuracy of results can be improved by using System.nanoTime().