Author Archives: Sachin Kumar
Create a Public Private key and Private CA and certificate
Create PEM private key: Create pem public key by using the private key: Create Certificate signing request (CSR) Create Private CA Private key Create Private CA Certificate Now use this private CA certificate to sign the CSR generated earlier You should use a trusted CA to sign your CSR and give you back the certificate.
.Net Dapper Bulk update (Query Generation)
Here is the example of how to create a generic method to update the different properties of same type of entities. E.g. you have User table with email, phone. And you want to update 10 records email and 5 records phone in a single DB roundtrip. By using the following method, you can do that
Fabric JS Zoom
This article will guide you through the implementation of zoom functionality using fabric.js library. Install Fabric JS lib 🤦♂️ Add post install script in your package.json file’s scripts: run ‘yarn’ in command line. It will build fabric.js with gesture support. Now the code. You always into to know your contents height and weight that you
OpenVPN allow only specific subnet/IP to use VPN
I had a VPN to access a database. Now it was hosted at the other end of the world (because most of the Devs were there). It was causing my whole internet to be slowed down. So, I had to find the IP of the DB. So, for that I used Resource monitor of windows
Azure SQL drop all tables
If you want to drop all tables, then you can use following query: You face an issue with ‘sp_msforeachtable’. So, you can create a procedure using following SQL command and try running the command above. The above script have some old syntax. But it was working at the time of writing this blog. May be,
Host your website/service at home
I know text is not easy to understand for less tech savvy people. So, I am in process of making a YouTube channel for video demonstration of tutorials. What you would need (Requirements): The flow of traffic would be (architecture) Your spare computer configuration: Edit Apache server v-host configuration. The location would be something like
Azure AD Token Authentication Web API
Authentication example: Where AzureAdOptions contains the configuration of your Azure AD. MyJwtEventsHandler is the implementation of JwtEventsHandler. e.g. Register authentication: MyAuthorizationMiddlewareResultHandler is the middleware behaviour overrider. Check Microsoft docs for more details. Use on your controller: Cheers and Peace out!!!
Token claims enrichment Azure AD B2C
Sometimes we need to add claims while user is being signed in using Azure AD B2C identity provider. For that we can use API connectors. First add the API connector. There will be two options for authentication: For this post we will be using Basic authentication So, add your endpoint, username and password and save.