Skip to content

Instantly share code, notes, and snippets.

View itorian's full-sized avatar
🎯
Focusing

Abhimanyu Kumar Vatsa itorian

🎯
Focusing
View GitHub Profile
@itorian
itorian / create-azure-vm-in-selected-subscription-powershell.ps1
Created December 24, 2017 10:51
Create Azure Virtual Machine inside selected subscription using PowerShell
# Login
Login-AzureRmAccount
# Set subscription to create resources in
Set-AzureRmContext -SubscriptionId "xxxxxxxxx"
# Variables for common values
$location = "westeurope"
$resourceGroup = "demo-resgroup-0"
$vmName = "demovm-0"
@itorian
itorian / PayPalRESTAPI.cs
Created June 7, 2019 13:14
PayPal REST API calls to get access token and process payment
using System;
using System.Text;
using System.Net.Http;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Web.Script.Serialization;
namespace ConsoleApp14
{
class Program
@itorian
itorian / DevOps-Pipeline-For-Linux-Build
Last active October 1, 2019 05:44
This gist has sample DevOps pipeline code to build ASP.NET Core Web Application for Linux
# ------------------------------------------------------------------------------
# 1. To build all .net core projects in a solution use below pipeline code
# ------------------------------------------------------------------------------
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
@itorian
itorian / create-azure-vm-powershell.ps1
Last active November 16, 2022 09:20
Create Azure Virtual Machine using PowerShell
# Login
Login-AzureRmAccount
# Variables for common values
$location = "westeurope"
$resourceGroup = "demo-resgroup-0"
$vmName = "demovm-0"
$publicIP = "spublicip-1"
$subnet = "subnet-1"
$vnet = "vnet-1"
@itorian
itorian / asp-dot-net-identity-to-asp-dot-net-core-identity-migration-script.sql
Last active July 19, 2023 19:51
Migrating database from ASP.NET Identity to ASP.NET Core Identity
-- STEP 1 : Change name of existing tables
EXEC sp_rename 'AspNetRoles', 'AspNetRoles_old';
EXEC sp_rename 'AspNetUserClaims', 'AspNetUserClaims_old';
EXEC sp_rename 'AspNetUserLogins', 'AspNetUserLogins_old';
EXEC sp_rename 'AspNetUserRoles', 'AspNetUserRoles_old';
EXEC sp_rename 'AspNetUsers', 'AspNetUsers_old';