Posts

Showing posts from February, 2019

Incognito mode in chrome

Image
The least we can to do when browsing using chrome is use incognito mode. So here is way to always open chrome in incognito mode use this argument for the application shortcut. --incognito Open the properties of application shortcut and change as below Here is what incognito mode does and what most people think is just the opposite. So incognito just makes sure that data like the history and the cookie are deleted when you close that window. It does not hide what you are browsing from the ISP or the software's that is running in your OS like the key logger or the antivirus etc., Happy browsing! Somewhat incognito 👽😜

Protecting sensitive data using Secret Manager in .Net Core

Image
Accidentally pushing sensitive data stored in application config into source controls!!! Thankfully this happens to many not only you 😜. It feels good when you have company doing mistakes or anything else.
So here is how make sure this does not happen again. There are multiple ways to protect, the one we will learn now is using Secret Manager tool in #dotnetcore. All we have to do use dotnet user-secrets this command. Before using it remove the sensitive value of the property you are trying to hide. In my case it is "TwilioAuthToken":"" in appsettings.json file. Now in the terminal run this below command, dotnet add package Microsoft.Extensions.SecretManager.Tools We have the necessary tools required to run the commands on user-secrets. Lets create a key value vault for our project in *.csproj file like this <PropertyGroup>
<UserSecretsId>LocalKeyVault</UserSecretsId>
</PropertyGroup> Once you have a vault create we can now add/remove key value…

Containerize an Application

Image
Here is how we containerize an application in this example in this example I have chosen a dotnetcore application. Photo by Samuel Zeller on Unsplash
Add a Dockerfile which will be used to create an image for your application. Below is the sample.
FROM microsoft/dotnet:2.2-sdk AS build this basically says create our application based on this Microsoft image. Navigate the shell to your application folder and then using docker run create an image for your application. docker build -t sampleapp. you can see your image using docker images. Finally that you have your image ready we can create as many container we need using this. There are two options to create a container out of the image you just created either use this below command docker run -d -p 8080:80 --name sampleapp appcontainername or use the docker-compose.yml file from the app folder. Which consists the exact same information as yml file. Then use docker-compose up in the application folder from the shell. now you must be able to…