Skip to content

Instantly share code, notes, and snippets.

View ahmedig's full-sized avatar
🎯
Focusing

Ahmed Elsayed ahmedig

🎯
Focusing
View GitHub Profile
@ahmedig
ahmedig / export_users_groups_ado.ps1
Created April 24, 2025 00:33
Export current ADO users and all groups assigned to them into a csv file
$PATKey = "";
$Organization = "https://dev.azure.com/MyOrg";
$UserGroupsObject = @()
$PATKey | az devops login --org $Organization
az devops configure --defaults organization=$Organization
$Users = az devops user list --top 10000 --org $Organization | ConvertFrom-Json
@ahmedig
ahmedig / clone_ado_users_domain.ps1
Last active April 24, 2025 00:34
A ps1 script to clone existing users with old domain and add their new domain to Azure DevOps while maintaining the same permissions
$PATKey = "";
$Organization = "https://dev.azure.com/MYORG";
$sourceDomain = "abc.com.au"
$targetDomain = "xyz.com.au"
$PATKey | az devops login --org $Organization
az devops configure --defaults organization=$Organization
@ahmedig
ahmedig / gist:6b13872e482d5b78ca2b6a3c17786649
Last active January 15, 2025 22:34
brew commands and packages list
aztfexport
azure-cli
brotli
c-ares
ca-certificates
docker
docker-completion
gettext
gh
git
@ahmedig
ahmedig / Purview-AddGroupsToPolicies.ps1
Created May 18, 2023 07:28
A script to add groups into policies in Purview
param(
[string] $PurviewAccountName,
[string] $SubscriptionId,
[string] $ResourceGroupName,
[string] $ManagedIdentityUserID = $null,
[string] $PurviewDataCollectionAdminGroupObjectId,
[string] $PurviewDataSourceAdGroupObjectId,
[string] $PurviewDataCuratorAdGroupObjectId,
[string] $PurviewReaderAdGroupObjectId,
[string] $PurviewShareContributorAdGroupObjectId,
@ahmedig
ahmedig / gist:9b3ccd92f0ccecdecd904d126fbfd060
Created October 5, 2021 23:40
Load test a service in K8S
while true; do wget -q -O - https://blabla/service/swagger/index.html; done
kubectl get hpa -w
@ahmedig
ahmedig / terraform-full-azure-pipeline.yml
Last active June 2, 2021 05:51
Terraform-full-Azure-pipeline
trigger:
branches:
include:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
terraform_directory: src
terraformVersion: '0.14.6'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@0
displayName: 'Install Terraform'
inputs:
terraformVersion: '0.14.6'
@ahmedig
ahmedig / DockerPush.yml
Last active October 28, 2020 23:27
Github workflow - Build, push to ACR and deploy to App Service
name: Push Docker Image to ACR
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
# paths:
# - "src/**"
pull_request:
@ahmedig
ahmedig / dockerfile
Last active October 22, 2020 11:38
Docker file for a dotnet new react project
# Pull down an image from Docker Hub that includes the .NET core SDK:
# https://hub.docker.com/_/microsoft-dotnet-core-sdk
# This is so we have all the tools necessary to compile the app.
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
# Fetch and install Node 10. Make sure to include the --yes parameter
# to automatically accept prompts during install, or it'll fail.
RUN curl --silent --location https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install --yes nodejs
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/ahmedelsayed/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes