Skip to content

Instantly share code, notes, and snippets.

Working from home

Rahul Nath rahulpnath

Working from home
View GitHub Profile
csuzw / index.js
Created Nov 7, 2019
Azure AD Single Sign On with Cypress
View index.js
// This goes in cypress/plugins/index.js
const AzureAdSingleSignOn = require('./azure-ad-sso/plugin').AzureAdSingleSignOn
module.exports = (on, config) => {
on('task', {AzureAdSingleSignOn:AzureAdSingleSignOn})
jackawatts / Add an Azure Resource Manager service
Last active Apr 1, 2020
Adding an Azure Resource Manager Service Connection in AzureDevOps
View Add an Azure Resource Manager service

Taken from:

AzureDevOpsAR is simply the name of the app registration AzureDevOps will be associated with, don't like the name? Simply change the references below.

  1. Create an App Registration to act as a Service Principal:
    1. Log in to
    2. Azure Active Directory => App Registrations => New Application Registration
    3. Name: AzureDevOpsAR, Type: Web app/API, Url: http://azuredevopsar (Url isn't important as it won't be used)
    4. Copy the Application ID as this will be the Service principal client ID
  2. Settings => Keys => Add
#this automates the steps found here:
#yes, you could code golf this to about 6 characters if you wanted to
$find= @'
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
foreach ($f in Get-ChildItem -Recurse -Path ".\" -Filter *.csproj | sort-object)
$text = Get-Content $f.FullName -Raw
davidfowl / Examples
Created May 21, 2011
Powershell function that recursively walks all project items within a project and lets you execute an action on each one
View Examples
# Print all project items
Recurse-Project -Action {param($item) "`"$($item.ProjectItem.Name)`" is a $($item.Type)" }
# Function to format all documents based on
function Format-Document {
[parameter(ValueFromPipelineByPropertyName = $true)]
Process {