Skip to content

Instantly share code, notes, and snippets.

# Create two resource groups.
# Create 10 storage accounts (5 in each resource group). Soft delete for containers enabled with 7 days.
# For each storage account, create 5 containers.
# Generate a random 1GB file.
# Upload the file to each container in all storage accounts.
# Delete all the containers.
# Delete random 1GB file.
# Pre-reqs perform az login
# az account set --subscription "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
@nilaydshah
nilaydshah / TestStorageAccountContainersBlobs.ps1
Created August 23, 2024 23:06
Sample script to create storage accounts, containers, blobs
# Create two resource groups.
# Create 10 storage accounts (5 in each resource group).
# For each storage account, create 5 containers.
# Generate a random 1GB file.
# Upload the file to each container in all storage accounts.
# Pre-reqs perform az login
# az account set --subscription "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
# create empty file named "random1GBfile.bin" in current folder
# review the variables and update them as needed
@nilaydshah
nilaydshah / ASEPreRegistration.py
Last active July 12, 2019 07:59
ASE Pre-Registration Script
import argparse
import sys
import grp
import pwd
import subprocess
import os
import json
class PreRegistration:
@nilaydshah
nilaydshah / FindMaxInBinaryTree.java
Created November 27, 2016 06:39
Finding maximum element in binary tree
public class FindMaxInBinaryTree {
// find max element in binary tree recursively
public int findMax(BinaryTreeNode root) {
int root_val, left, regith, max = 0;
if(root != null) {
root_val = root.getData();
left = findMax(root.getLeft());
right = findMax(root.getRight());
// find the largest of the three values.
@nilaydshah
nilaydshah / AsyncAwaitImpl.cs
Created October 5, 2015 12:35
Async Method in C#, using async and await
using System;
using System.IO;
using System.Threading.Tasks;
class AsyncAwaitImpl
{
static void Main()
{
// Create task and start it.
// ... Wait for it to complete.