Friday, July 2, 2021

How to loose 20 kgs in 1 year 115 kgs to 90 kgs? Keep moving, walking is one such way to loose weight

To loose weight, keep moving around. Walking is one such way to achieve weight loss. We humans are designed to either rest or move all the time.

This is my story of losing ~20 kgs in ~1.5 yrs.

It all startes in the month of November 2018, It wasn't the first time that I thought to shed some weight. I had tried swimming and had gone down from 115 to 104 but then I regained all my weight back to 113-115. 

Like everyone, we always have a friend or find a friend to walk with. Soon i realized, we couldn't walk together because our stride and pace wouldn't match. What made it more miserable and less motivating is that my friend was taller than I am and he would be ahead within the first 50 steps and I would be gasping, yes literally gasping to catch up and give up catching up as well as walking. 

Okay, I had a friend for company, I couldn't walk with him, but I needed to walk. So i told my friend, you fly your way, i'll crawl my way out. He seemed a master swiftly marching with those giant footsteps at adorable and admirable pace and here was I like a baby elephant trying to crawly way through. 

First day I remember I walked about 2km, Question me, well how did I know it was 2km? Well, we figured out there's this google fit app and as it was free and we began to introduce ourselves to those fancy words of steps,stride, pace etc., which I won't confuse you for now. 

I went back home stepped on the weighing machine (This guy already has a weighing machine? Well, remember I tried to loose weight swimming, so I had bought one). This was the first day and it showed me 113 at night, this was before food. 

Next morning I wake up, it's 112 and I get all excited, wow 1 kg for 2km and I am all motivated and also at the same time wondering if I am missing something. Within a few days it all came clear to me.

So here's what happens, you eat food u and u sleep, morning you are 06 to 1 kg lighter than last night. Take away 1: Either you weight yourself in the morning or weigh yourself in the evening whatever your going to eat to going to add weight including drinking water. 

I checked my weight both early morning as soon as you wake up and right after dinner. I am a little too curious and love to observe. And this time, i was able to do it at a stretch. I eventually realized that I was losing weight fast. I was soon 108 in like a week and my walking speed and pace improved including my stamina. Well, this is not actual weight.... Sadly it's called water weight. 

Takeaway 2: You will loose 2 to 3 kgs very easily in the first week but then thereafter the needle stops, its basically your body losing water and it will take another 1 week of exercise to see another 0.5kg reduce. 

Conclusion: After your 1st week or exerciae and weight loss, continue the rhythm, and make it a habit to just walk for the heck of it. 

Btw, how much did I wall, and how much to walk? 

Did I follow any diet? What was the strategy? 

Did I take any supplements? Straight No! 

Who was my guide? How did you clear your questions and answers and motivate yourself? Answer : Listening to podcasts on Nutrition and diet. I cut the sugar! 


... To be continued whenever I get time... 

This story is incomplete. I plan to detail this article in parts.

I will share my experiences and take aways on how I progressed all through my weeks/days/months and years and what worked for me.

For now, these are the transformation pics:

This journey of mine started in the month of November 2018 and as on today I am able to maintain my weight at 88 kgs and plan to shed another 5-10 kgs .






Monday, June 7, 2021

What is Heroin? Is it priced high or is it cheap?

 I am based out of India and I read a news article of a woman being arrested for smuggling drugs. What caught my eye was 12Kg Heroin being worth 78 Cr.

This implies 1 Kg is 6.5 Lakh and 1 gram is Rs 6,500. This still felt costly.

A few more articles on the net, and here's the deal.

Drugs i.e., tablets are given in mg and heroin is called a opiod. It's a pain reliever and an average tablet is 80mg which makes 1 mg - Rs 6.5 and 80 mg -Rs 50. That's cheap for a tablet isn't it? In India it's still costly.

Let's get to the dollar world.

People have surgeries People have pain and are prescribed pills. Heroin falls in the similar category acting as a pain killer and is cheaper. That being said some take it for pain some to heal and some for pleasure. I am not advocating the usage of Heroin for any of this. I am trying to reason out the reason people move to Heroin.

The national average for painkillers tends to be anywhere from $60 to $100 a pill. Heroin is the cheaper option and to conclude on 3 short notes, here's the what Heroin does :

"To achieve the desired high, a person would have to crush the pill and either snort it or created a solution they could inject.Many of the pills are harder to crush now, and even when it’s added to water, it isn’t necessarily dissolvable to the point it would need to be for injection."

When smoked, the effects of heroin usually kick in within a few minutes.
The effects can last for around an hour.
Heroin will typically show up in a urine sample for 2 to 3 days. 

Heroin on the brain can cause cravings and a strong drive to keep on using.
This is a Class A drug, which means it's illegal to have for yourself, give away or sell.

Source and References:

https://www.therecoveryvillage.com/heroin-addiction/how-much-is-heroin/

https://www.talktofrank.com/drug/heroin#duration

https://www.camh.ca/en/health-info/mental-illness-and-addiction-index/heroin

How to resolve Failed to connect to port 443: Network is unreachable when using curl with PHP?

 Add the following lines to the code. This might solve the problem.

$proxy="abc-proxy.example.com";
$proxyPort=80;
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYPORT, $proxyPort);

How to find out if curl is enabled for PHP on your web server?

 https://www.discussdesk.com/how-to-install-curl-and-check-curl-is-enabled-in-web-server.htm

1. phpinfo

curl

cURL support     enabled
cURL Information     7.54.0         
 
 

2. Verify through PHP code


 if (in_array ('curl', get_loaded_extensions())) {

echo "CURL is available on your web server";

} else {
echo "CURL is not available on your web server";
}    















How to find the extensions directory for PHP?

phpconfig

bash-3.2# php-config --extension-dir
/usr/lib/php/extensions/<foldername>

Sunday, May 2, 2021

How to find the executable path of a php,mysql program? - Try which and whereis

You may want to find out where the executable is installed or is being executed from

which php

/usr/php


which mysql

/usr/local/mysql/bin/mysql

 

Alternative command for the same results as above.

whereis php

whereis mysql

echo "">access_log How to clear a log file without deleting it?

 Do you want to debug a file and realize it has too much of content in it.

Let's say the file name is access_log.

just say echo "">access_log.

This will replace the content with the blank file.

Now your file is ready to starting logging data from now :-).

Note: Please use this at your own discretion. This is just a workaround.

How to define a temporary variable in mac Terminal

How to define a temporary variable in mac Terminal?
 

Example1: Lets say I want to store company Name into a temporary variable in a terminal and display it.

export companyName="GGHL"
echo $companyName
GGHL

 

Example2: Display machine name path

export myhomedir=/Userss/${USER}
echo $myhomedir
/Users/username

Saturday, May 1, 2021

Top 5 tips of using meta tag in html web pages to improve SEO

 Meta tags are meta (additional) information usually describing the page and its contents. This is generally for search engines to read and understand the content of your page.

1. Set the charset -
<meta charset="utf-8">
This will ensure that when you go for international character sets, you will not see gibberish. If you do not understand, safely use the above statement for any html page.

2. Set the author name
<meta name="author" content="<author name>">
It is learnt that this information can be helpful in identifying the original author of the content. Search engines do use this information.

3. Search Engine Optimization (SEO)
<meta name="description" content="The important keywords of your article should go in here, so that when a user searches on a search engine, the page rank and the probability of the search results displaying on top results increases."

4. Keywords
<meta name="keyword" content="HTML,CSS,javascript">
Keywords will help Search engines as part of SEO ( Search Engine Optimization ) filter your page when a user uses keywords to search their results. It is also recommended that these keywords be frequently used- not overused in the content of the page being displayed to allow search engine to consider the page and keywords relevant and move your page up the order.

5.Title tag
<title>Your page title</title>
Even though this is not part meta tag, it is worth mentioning that this tag also adds value when a user searches on a Search engine and is an important parameter for SEO (Search Engine Optimizer), a key placeholder.

Friday, April 30, 2021

Where is php.ini located on macOS

Location of php.ini file

 <prompt>:~<username>$ php -ini

List the php modules installed

$php -m

Sample output:

bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom


What is the mantra and meaning of prabh ki simaran ridh sidh no nidh?

Happy Friday, I learnt something new today from a forward from a friend. It's a mantra.
Here's my learning or decoding of what's in it.

prabh ki simran ridh sidh no nidh |
prabh ki simran gyaan dhyaan thath budh |

I came to know that there is a complete mantra Read more

 Since I am no good at vocabulary. I did my part to break it down further.

Prabh -> Prabhu -> God : Prabhu
Simran -> Continuous remembrance
Ridh -> Prosperity : Riddhi
Siddh -> Accomplishment : Siddh-arth
Nau Nidh -> 9 Treasures

Gyaan -> Knowledge ( spiritual or religious knowledge )
Dhyaan -> Contemplation, Reflection, Meditation
Thath -> Supreme
Budh -> To Awkaen, To Know, To become aware or : Buddha

HTH, Please share your wisdom


Wednesday, April 28, 2021

How to find the OS version of a linux remote machine? /etc/os-release

 cat /etc/os-release

Should give you

NAME
VERSION
ID
VERSION-ID
and so -on...

How to find the web server location of html, php files on a remote machine?

 I had to make modifications on a remote machine.But i did not know the location where web server files html or php are located.

ssh username@remotehost
password: #####

bash$cat /etc/httpd/conf/httpd.conf | grep DocumentRoot

# DocumentRoot: The directory out of which you will serve your
DocumentRoot "/var/www/html"

cd /var/www/html

There I was in the directory to proceed further,

Tuesday, April 27, 2021

What do the version numbers mean in NPM modules ^ ~

 

A package with the sequence 4.17.4 is interpreted as Major release, Minor Release and patch.

^4.17.4 - keep major version update minor version

~4.17.4 - keep minor version update patch

4.17.4 - exact version

* - latest version

How to find root directory of NPM modules?

 npm root -g

Monday, April 26, 2021

What is XHR?

 XHR stands for XmlHttpRequest object.

This is the traditional way of accessing data asynchronously.

HTML file has a button that we will use to trigger the event.

!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<!--<meta http-equiv="X-UA-Compatible" content-->
<meta name="keyword" content="AJAX">
<meta name="description=" content="AJAX example">
<!-- <script type="javascript" async="" src="js/ajax.js"></script> -->
<title>AJAX Example</title>
</head>
<body>
<div class="container">
<button id="button">Get Data</button>
<br><br>
<div id="output"></div>
</div>
<script src="js/ajax.js"></script>
</body>
</html>



<script src="js/ajax.js"></script>

Saturday, April 24, 2021

Where are the macOS commands located? What are /usr/bin /usr/local/bin directories used for?

We have all heard of /usr/bin /usr/local/bin and so on. Do we know how and why they are organized?Let's get started

/bin - user utilities - cd ls cat bash cp pwd - all these are here. Did you know? 

/sbin - s for system program and administration

ping mount reboot shutdown ifconfig - ring a bell?

/usr/bin - non-system programs - 

awk base64 curl emacs find grep ssh php vim perl php python rake rails sed

/usr/sbin - system daemons(background processes) & system utilities only

chown chmod cron httpd sendmail sshd apachectl - sytem utilities that are user specific

/usr/local/bin - The programs installed over the base operating systems due to a dmg file installation or using a package manager might land up here.

Example: Lets say you install mysql it would be installed in /usr/local/mysql/bin. Similarly php would be installed in /usr/local/php

Summary:
/bin and /sbin - commands provided by OS - /bin - consumers /sbin - system administrators
/usr/bin - utilities used by developers
/usr/sbin - utilities used by OS administrators
/usr/local/bin - compilers/executables softwares installed - php and mysql
/usr/local/sbin - administrative commands for softwares installed - Apache restart, mysql server start re-start

We all use cd, ls and many such commands in the macOS Terminal day in and day out. I am better than yesterday after I learnt this today. I know where to search my executables.

Credits & Thanks to :https://medium.com/@jalendport/what-exactly-is-your-shell-path-2f076f02deb4