Skip to content

Instantly share code, notes, and snippets.

Sumit Kumar sumitsaiwal

Block or report user

Report or block sumitsaiwal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
sumitsaiwal / vsts_build_retain
Last active Aug 16, 2018
Retain VSTS build indefinitely
View vsts_build_retain
#import-module "Microsoft.TeamFoundation.DistributedTask.Task.Common"
$uri = "$($env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI)$env:SYSTEM_TEAMPROJECT/_apis/build/builds/$($env:BUILD_BUILDID)?api-version=2.0"
Write-Verbose "URI: $uri"
$body = "{keepForever:true}"
$result = Invoke-RestMethod -Uri $uri -Method Patch -ContentType "application/json" -Headers @{Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN"} -Body $body
Write-Output "RESULT: $result"
View Container to GUI
Driver Support Required:
1. Display
2. 3D hardware acceleration support
3. Audio
4. Webcam
5. Video-game controller
sumitsaiwal / aws_ebs_volume_k8s
Created Jul 28, 2018
AWS EBS Volumes in Kubernetes
View aws_ebs_volume_k8s
- name: APP_NAME
- name: http
containerPort: 3000
- name: share
mountPath: /var/lib/
sumitsaiwal / Docker for Windows: Shared Drives
Last active Jun 26, 2019
Docker for Windows: Shared Drives Issue
View Docker for Windows: Shared Drives
Set-NetConnectionProfile -InterfaceAlias "vEthernet (DockerNAT)" -NetworkCategory Private
##keep this running for Decryption
while ($true)
   if ($(Get-SmbServerConfiguration).EncryptData)
View connection_proxy
## ssh connection behind proxy, requires netcat(nc) installed
ssh USER@FINAL_DEST -o "ProxyCommand=nc -X connect -x PROXYHOST:PROXYPORT %h %p"
sumitsaiwal /
Created Feb 5, 2018 — forked from staltz/
The introduction to Reactive Programming you've been missing
sumitsaiwal / MoveAzureResouces2diffRG.ps1
Created Feb 2, 2018
Moving Azure resources from one RG to another.
View MoveAzureResouces2diffRG.ps1
$sourceRG = Read-Host 'sourceRG' #Name of source Resource Group
$destinationRG = Read-Host 'destinationRG' #Name of destinatino Resource Group
$Subscription = Read-Host 'SubscriptionName' #Name of Subscription
#Get resources
Select-AzureRmSubscription -SubscriptionName $Subscription
sumitsaiwal / MoveResourceToDiffAzureSubscription.ps1
Created Feb 1, 2018
Moving Azure resources from one Subscription's resource group to another Subscriptions's resource group
View MoveResourceToDiffAzureSubscription.ps1
$oldSubscription = Read-Host 'oldSubscriptionID' #Name of source susbcription
$newSubscription = Read-Host 'newSubscriptionID' #Name of destination subscription
$sourceRG = Read-Host 'sourceRG' #Name of ource Resource Group
$destinationRG = Read-Host 'destinationRG' #Name of destinatino Resource Group
#Get resources
sumitsaiwal / openssl cert azure
Last active Jan 31, 2018
openssl certs for azure VPN
View openssl cert azure

The sole dependency is a build of openssl for your platform. Without further due, our first step is to provide Azure with a certificate that will be used to sign client certificates. We call this the root certificate and by importing it to Azure we trust certificates signed by it. Most of the following commands will ask you to guard the output files with a passphrase, leave them empty until you have a working solution, then follow the guide again and add strong passwords when you’re asked to.

Generate CARoot private key

openssl genrsa -aes256 -out MyAzureVPN.key 2048

Generate a CARoot certificate valid for 10 years

openssl req -x509 -sha256 -new -key MyAzureVPN.key -out MyAzureVPN.cer -days 3650 -subj /CN=”MyAzureVPN”

In Azure portal navigate to “Virtual Networks/Manage Certificates/Upload” and import MyAzureVPN.cer. Next we create client certificates by issuing the bellow

Generate a certificate request

sumitsaiwal / Install Docker
Last active Oct 8, 2018
Docker installation for Ubuntu 16.04
View Install Docker
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp:// --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
#sudo apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt-get install -y docker-engine
#sudo apt-cache policy docker-engine
#sudo apt-get install -y docker-engine=1.13.1-0~ubuntu-xenial
sudo service docker start
You can’t perform that action at this time.