Saturday, August 05, 2023

Section 80C TMT 2023(PA) – Standard Deduction amounting to a maximum of Rs 8670 under IT rule

With the recently concluded Tax filing season (which if I may draw parallel to the Christmas holiday season enjoyed by one and all), Indians were able to keep their body and soul together in this season. What with this time of the year, where one is expected to scrutinize his own books and ensure that the avg Indian (disclosure I have abstained myself from being tagged in the middle class after I was employed with Microsoft) has done enough for the country by paying their due to nation building, I am sure everyone ruminates over the exercise and feels something like this (for the naïve the red bag is what is carry forward to the next year after the assessment) :



 Well coming back to the topic and I wanted to request (and demand in whatever little capacity that I am safely bestowed upon by the constitution of India), I request the honorable FM, to introduce a new section 80C TMT 2023(PA), which should be formulated as follows :

80C TMT 2023 : Deduction in respect of contributions on payment towards high inflation grocery and daily commodities

(1)In computing the total income of an assessee, being an individual or a Hindu undivided family, there shall be deducted, in accordance with and subject to the provisions of this section, the whole of the amount paid in the previous year, being the aggregate of the sums referred does not exceed Rs 8670, and is made towards purchasing daily grocery and Kirana items where they shoot the inflation rate of 5% on the govt approved MRP/MSP.

  

While this is still in draft and I will ask my fellow citizens add more subsections and clauses to cover other important items, but the intention is clear. 

On a related note, Red seems to be the color of the season(gold and silver is passe) with party organizers flooded with requests to have red themed parties.

 Virgin Bloody Marry the cocktail of the month. 


PS : Yours truly recently purchased Rs200/Kg tomatoes this season thrice already.

PS2: TMT – stands for tomatoes, PA – Parag Agrawal , would be good to have your name immortalized as part of this section.



Thursday, April 13, 2023

[Solved] Failed to load plugin '@typescript-eslint' problem while running a React app

 If you have ever run into this problem while working on a react project, and it seems to be working for others in your team, 

Error message: 


Failed to load plugin '@typescript-eslint' declared in '.eslintrc » eslint-config-react-app#overrides[0]': Cannot find module 'typescript'
Or 
Failed to compile.

[eslint] Failed to load plugin '@typescript-eslint' declared in 'package.json » eslint-config-react-app#overrides[0]': Cannot find module './Base'

then after trying out multiple solution and scouring different forums, I found out that simply running this on the command prompt in the project folder did the trick for me.

D:\ParagDemos\ClientPaymentDemoApp\ClientApp>npm install typescript-eslint

up to date in 7s

247 packages are looking for funding
  run `npm fund` for details
D:\ParagDemos\ClientPaymentDemoApp\ClientApp>

And it did not even change the package.json for me. 




Sunday, January 23, 2022

Prisha and the Tooth fairy - Part 2 aka A practical guide for negotiating the deal between the child and the fairy)

 Well, some of you reached out to me to elicit more information on what was offered by the Tooth Fairy (TF) for the exchange of the precious milk tooth, after the ill-fated event which soon could have coalesced into a cataclysmic fiasco. (yeah we did find out the tooth and the tooth fairy was saved from dusting the room for scouting the tooth). 

For the others (uninformed ladies and gentleman) , I will soon share [Placeholder - Prisha and the lost Milk tooth]

I can deduce the motive for such inquiries. They(inquirers) broadly can be pigeonholed into two groups: 

  • Just plain inquisitive : They just want to know what do tooth fairies offer. What is that Prisha got? (eg, Grand parents/family/Prisha's friends)
  • New Parents in town/Experienced ones but want to know what all can tooth fairy offer: any additional setup you need to offer for this farce. 



Well to the folks who belong to first category, well the TF offered her a envelope loaded with cash. Well it knew it was visiting the Agarwal household, and what can be more pragmatic, convenient and handy than cash $$.







 One is saved from all the fretting and wailing if the TF doesn't get what the child really wanted. So you offer him the cash and take them out to a shop and buy. Or you can be the ingenious kind and order the needed thing from your fav store /hand over to the TF. 

For the folks belonging to the second category: the answer is: it can be anything which is reasonable and should lie somewhere in-between the He/She has been asking for it often vs the birthday present. Coz lets be real, most likely the child has more teeth's in line ready to fall off. You don't want to raise the expectations, and then they would be like,"What? Last time she/TF gave me X(really expensive gift you bought) , and now this. This must have been a mix up. I want my tooth back. Call her". And you don't want to be scouting for TF's customer care number for a exchange. 



 But to be really honest, children dont really like cash. They like gifts in kind. And Prisha did complain a bit and I tried to rationale with her, what if she(TF) bought you a Pictionary set or Uno cards, which you already have and then it would be useless/redundant. She saw the point, and somehow I was able to convenience her that a tooth brush could also have been on offer. So next time, she needs to keep a letter ready along with the tooth, so that the TF can order get it for you. 

PS: This also got me ruminate on the gifts TF bought me for my precious milk tooth's and why was it that my last two teeth's weren't bought back. May be I will write about it another time. 

PS2: Happy New year everyone. 


Src : https://imgur.com/gallery/fmyvlLm

Wednesday, December 01, 2021

How to get Lenovo Make and Model for Warranty validation on Lenovo Website

 Sometimes you may find yourself in a position to check the warranty remaining on your Lenvovo Asset/Laptop/Machine. 

You can run 

C:\TestFolder\Parag> wmic bios 

on a windows command prompt to get that information, which can be looked up on Lenovo website for validation remaining. 

this is how the information looks like 


You should copy the serial number and look it up at Lenovo  warranty look up site. 

Another way to look up this information is via GUI. Read more about it here

Tuesday, September 29, 2020

How to Do APP to APP based authentication for Azure AAD applications

Sometimes you need to do app to app based authentication in your applications/services to prevent unauthorized access to your services . Example you may have a service A which needs to be accessed by another service, you can either configure a username/password based authentication or certification based authentication or a simple app to app based authorization. 

To enable Azure AAD App to App based authentication, you need to do the following changes : 

1)  First in your issuer / authorizing apps app manifest, declare some roles which can be applied to applications. 

{
            "allowedMemberTypes": [
                "User",
                "Application"
            ],
            "description""Some app role which also needs app based auth",
            "displayName""SERVICE_APPLICATION_ROLE",
            "id""23d29786-d213-40f6-ad11-ddf9f7d71d30",
            "isEnabled"true,
            "lang"null,
            "origin""Application",
            "value""SERVICE_APPLICATION_ROLE"
        },

2) Next in your consumer /contacting service request access to the producer/servicing access from MS portal API permissions section

Pic 1



3) in your consumer/client service have a configuration section defined as :

 "AzureAdConfig": {

    "ClientId": "5186aaaf-d222-458d-83c1-faa73773bbc",

    "ClientSecret": "SOME-clIenT=SEcret.7&---",

    "TenantId": "a263c89-4222-4555a-222c-6fe11111cb"

  },

 Next bind this section in your application config as : 

AzureAdConfig azureAdConfig = new AzureAdConfig();
this.configuration.Bind("AzureAdConfig", azureAdConfig);

and then authenticate it as follows : 

var app = ConfidentialClientApplicationBuilder.Create(config.ClientId)

               .WithClientSecret(config.ClientSecret)

               .WithAuthority(AadAuthorityAudience.AzureAdMyOrg)

               .WithTenantId(config.TenantId)

               .Build();

//auth scopes API is the api guid of the authorizing app (check image below Pic 2)

List<string> authScopes = new List<string> { "api://f1ffff77-f224-456a-8222-3777773/.default"};

var result = await app.AcquireTokenForClient(authScopes).ExecuteAsync();

            return result.AccessToken;

Next you can use this token to make all service to service calls 


Pic 2


Saturday, September 26, 2020

Configure / Bind application with Azure Key Vault

As good development practice teams should not check-in any secrets/configuration setting like DB connection strings, usernames, passwords. Instead they should be be kept in safe stores like key vault and accessed directly from your application, without much ado/difficulty. 

 If you need to configure your application with Azure key vault for reading all your application configuration keys / settings, then do the following changes in your application and it would bind the appsettings.config with the keyvault of your settings/configuration. 


Here the following settings you need to do in your code : 

using Microsoft.AspNetCore.Hosting;
using Microsoft.Azure.KeyVault;
using Microsoft.Azure.Services.AppAuthentication;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Configuration.AzureKeyVault;
using Microsoft.Extensions.Hosting;

namespace Sample.Parag.KeyVaultExample.TestWF
{
    public class Program
    {
        public static void Main(string[] args)
        {
            CreateHostBuilder(args).Build().Run();
        }

        public static IHostBuilder CreateHostBuilder(string[] args) =>
            Host.CreateDefaultBuilder(args)
             .ConfigureAppConfiguration(async (builder) =>
             {
                 var builtConfig = builder.Build();
                 var keyVaultName = builtConfig["KeyVaultName"];
                 var azureServiceTokenProvider = new AzureServiceTokenProvider();
                 var keyVaultClient = new KeyVaultClient(new KeyVaultClient.AuthenticationCallback(azureServiceTokenProvider.KeyVaultTokenCallback));
                 builder.AddAzureKeyVault(
                   $"https://{keyVaultName}.vault.azure.net/", keyVaultClient, new DefaultKeyVaultSecretManager());
             })
                .ConfigureWebHostDefaults(webBuilder =>
                {
                    webBuilder.UseStartup<Startup>();
                });
    }
}
Here KeyVaultName in buildConfig["KeyVaultName"], is defined in appsettings.json , and it is the name of keyvault name. 

like 
...
"KeyVaultName": "azureApp-key-vaultName",
...

Next you can start accessing any secret stored in Azure Key Vault like this : 


        public string GetFooFunc()
        {
            return this.config["SomeKeyName"];
        }

Wednesday, July 01, 2020

[Solved] Az login error while logging through chrome

Ran into a strange issue today, while trying to login through AZ CLI commands on powershell to my Azure account.


PS C:\Users\Parag> az login
Port '8400' is taken with error '[WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted'. Trying with the next one
Terminate batch job (Y/N)? y
PS C:\Users\Parag>

while chrome would happy show the login window, and after entering my credential , the final page/redirection page would fail. it would redirect to


https://localhost:8400/?code=<SomeCODE>&state=<SomeCode>&session_state=<SomeCode>


This site can’t provide a secure connection.
After trying it a lot from closing powershell and relaunching, and running it even from Admin mode it did not solve the issue.

So after googling a bit found this answer:

PS C:\Users\paagra> az login --use-device-code
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code XYZHDAM34 to authenticate.

and then on browsing https://microsoft.com/devicelogin  and entering the code presented the azure login was successful and i was able to continue

Section 80C TMT 2023(PA) – Standard Deduction amounting to a maximum of Rs 8670 under IT rule

With the recently concluded Tax filing season (which if I may draw parallel to the Christmas holiday season enjoyed by one and all), Indians...