Author: Daniel

  • My Experience With TTIBI

    I purchased my first car, Toyota Etios Liva, in the year 2018. Since then, I never opted for insurance from the dealer.

    I always assumed that the premium would be higher if purchased through the dealer compared to getting an insurance on my own. That was the case until last year.

    I purchased Insurance from TATA AIG in 2024 and I must admit that I loved their web interface. The claim process was clearly outlined, making it easy and efficient to navigate.

    Unfortunately, I had to claim insurance for a minor incident and because of the claim, the premium went up this year during renewal.

    I was looking out for the best value for money Insurance plans from different companies. But, all the plans turned out to be higher than my calculations. I believe that the reason for the higher premium is not only the claim but also other factors such as the age of my car, Inflation, the current economy, etc.

    One day, I received a call from my dealer’s insurance team reminding me about my insurance renewal. I became curious and asked them to send me a quotation. I was quite surprised by what I saw.

    The quoted premium was half the price of the quotation I received from my current insurer. So I called them and mentioned that I made a claim in the current policy and asked them factor-in the NCB.

    The dealer’s insurance team verified that the premium reflected had no NCB (No Claim Bonus) in it. To explore more options, I requested quotations from public sector insurance companies that they had tie-ups with. The premiums were nearly the same.

    I quickly realized that as the car ages, the tie-up Insurers can provide higher IDVs with reasonable premiums.

    Eventually I went ahead with TTIBI insurance. I also insured the newly installed Dashcam valued at INR 15,000 (including memory card under Electrical Accessories).

    Unfortunately, the amount I paid via their Web interface failed twice. Thankfully, I was able to recover the amount through their prompt E-mail support.

    Today, I’m grateful to live in a world where information is just a few clicks away. The ability to explore options, compare prices, and resolve issues — all from the comfort of my home — makes me appreciate the technology-driven convenience we often take for granted.

  • When WP CLI fails, Use SQL

    WP-CLI is a powerful tool, but when you’re dealing with a huge volume of comments, it might not always behave as expected.

    Recently, I tried to use WP-CLI to move all pending comments to spam. The list includes over 67,000 unapproved comments. When I tried to list all the comments, WP-CLI returned odd outputs like 67844%. Here’s how I solved it using direct SQL commands.

    The Problem

    Running the following command returned a strange output 67844%

    wp comment list --status=hold --format=count

    When I debugged with the help of ChatGPT, I realized that WP CLI may not behave as expected when working with large number of results.

    So I chose to get the job done using SQL query. All I had to do was to run the following query.

    UPDATE wp_comments SET comment_approved = 'spam' WHERE comment_approved = '0';
    
    // To verify the result, run
    SELECT COUNT(*) FROM wp_comments WHERE comment_approved = '0';

    Next time, when WP CLI lets you down, don’t hesitate to hit the SQL query.

    Today, I’m grateful for my consulting gig, which allows me to work from my home office and spend quality time with my family.

  • Beginning 2025 With Blessings

    We chose to attend the night mass for the new year. My son loves the decorations at the church in the night.

    The decorations in the Church, unlike the last couple of years, weren’t very delightful to the eyes. Also, it was painful to see people from other religions treating the Church as a tourist spot.

    Selfies and the midnight countdown in the Church isn’t the behaviour one would appreciate while the mass is on. Since the Church is a public place, there is nothing much we can do.

    We spent the first hour of the New Year, for the Lord and returned home for a good night’s sleep. The morning was filled with play, food and movies. Later, in the evening, we as a family received blessings from both our parents. We ended the day with Polar Bear Ice creams.

    I’m grateful to the Almighty for adding another year to my life.

  • Eyeball Exercises To Improve Eyesight

    If you spend a lot of time in front of screens (computer, tablet, phone, etc.), these eye exercises can help keep your vision healthy.

  • My 5 Month Beard Growth Journey

    Beard is a symbol of strength. But in India, beards are associated with dullness and sickness, at least in the region where I live.

    I’ve always wanted to grow a beard since my childhood. I neither had the patience nor the resources to grow a healthy beard.

    Ever since I watched Eric Bandholz talk about the power beard I wanted to grow my beard. So I decided to give it a try. On April 21, 2024 I trimmed my beard to 0.5mm and began from there.

    Five months have passed and I’m happy with my commitment. Over time, I learnt to avoid harmful chemicals and included only organic coconut oil in my beard care routine.

    With essentials oils, I make my own beard scent that not only smells great but also helps beard nourished. My wife loves the scent of my beard.

    If you’re looking to grow out a beard I suggest you give it a try.

    Live bearded!

    Beard growth stages
  • List Global Git Aliases

    Here is a quick & easy way to list all Git global aliases.

    git config --list | grep alias
  • WordPress: Underscore And Lodash Conflict

    In one of the projects that I’m working on, I recently encountered a conflict between Underscore library used within WordPress and the Lodash library used with the Theme I was working on.

    I knew from the console errors that the conflict arises because both use _. syntax. I knew that I must use _.noConflict() but I didn’t know where to.

    One of my fellow developers came up with the following solution to solve the issue.

    wp_enqueue_script( 'et-onboarding', $BUNDLE_URI, $BUNDLE_DEPS, (string) $cache_buster, true );
    
    wp_add_inline_script( 'et-onboarding', '_.noConflict(); _.noConflict();', 'after' );
    
    wp_localize_script( 'et-onboarding', 'et_onboarding_data', self::get_onboarding_helpers() );

    I’m fortunate to be part of a team of brilliant folks.

  • Javascript: Remove Duplicates From Arrays — A Simple Way

    Let us dive right away with an example.

    const urls = [
        "https://example.com/premade/wp-content/uploads/sites/4/2023/11/800x800.jpg",
        "https://example.com/premade/wp-content/uploads/sites/4/2023/11/800x800.jpg",
        "https://example.com/premade/wp-content/uploads/sites/4/2023/11/800x800.jpg",
        "https://example.com/premade/wp-content/uploads/sites/4/2023/11/800x800.jpg",
        "https://example.com/premade/wp-content/uploads/sites/4/2023/11/800x800.jpg",
        "https://example.com/premade/wp-content/uploads/sites/4/2023/11/800x800.jpg",
        "https://example.com/premade/wp-content/uploads/sites/4/2023/11/800x800.jpg",
        "https://example.com/premade/wp-content/uploads/sites/4/2023/11/800x800.jpg"
    ];
    
    const uniqueUrls = [...new Set(urls)];
    
    console.log(uniqueUrls);
    

    Now the question is — how does a Set object remove duplicates? Set objects are collections of values. A value in the set may only occur once; it is unique in the set’s collection.

    Note that our array urls must be converted to set and then back to array. The conversion is very simple.

    const myArray = ["value1", "value2", "value3"];
    
    // Use the regular Set constructor to transform an Array into a Set
    const mySet = new Set(myArray);
    
    mySet.has("value1"); // returns true
    
    // Use the spread syntax to transform a set into an Array.
    console.log([...mySet]); // Will show you exactly the same Array as myArray
    
  • Bearded Vs. Clean Shaved: What’s The Right Choice For You?

    Some people look great with beard. Some look handsome when clean shaved. How do you know which one will make your more attractive?

    One way to figure out is to click pictures and compare your looks side-by-side. But what if there’s a guideline that you can simply lean to.

    Well, a study by Dixson outlines that when you’ve a well defined jawline, you can pull off with a clean shaven look. On the contrary, if a strong jawline isn’t your strength, you can look great with a full beard.

  • The 16/8 Eating Method: Why You Should Give it a Try

    What is 16/8 Eating Method?

    The 16/8 method, also known as intermittent fasting or Time Restricted Feeding (TRF), is a popular eating pattern that involves fasting for 16 hours each day and restricting eating to an 8-hour window. An ideal eating window shall be 11 AM to 7 PM. During the fasting window, you can consume water or black coffee (ideally, without sugar). However, you can get away with sugar as well.

    I’ve been following the 16/8 eating method since a few days. Sugar cravings have gone down. My energy levels stopped crashing too often unlike before.

    Benefits Of 16/8 Eating Method

    Weight loss: Thinking of reducing your body weight? Before you think of hitting the gym, consider the 16/8 eating method because you can significantly reduce your body weight just by restricting your feeding time.

    Cardiovascular health: TRF can effectively improve your cardiovascular healthy by reducing your blood pressure, cholesterol levels, and inflammation. (Effectiveness of Intermittent Fasting and Time-Restricted Feeding Compared to Continuous Energy Restriction for Weight Loss)

    Blood Sugar Regulation: TRF improves glucose tolerance and insulin sensitivity. Thereby, reducing type 2 diabetes. (Time-restricted feeding is a preventative and therapeutic intervention against diverse nutritional challenges)

    Cancer Therapy: When you increase the fasting window, your body attains Autophagy. Autophagy is a natural cellular process that occurs in the body, involving the degradation and recycling of unnecessary or dysfunctional cellular components. (The Roles of Autophagy in Cancer)

    If you are new to the 16/8 eating method, you should definitely give it a try. Your will love your body once you being to see you body transform into a new “you”.

    Today, I’m thankful to the Internet for allowing me to learn so much for FREE right from the comfort of my home.