Skip to content

Instantly share code, notes, and snippets.

View Ricky-G's full-sized avatar
😀

Ricky Gummadi Ricky-G

😀
View GitHub Profile
@Ricky-G
Ricky-G / sample-api-aks-deployment.yaml
Last active August 21, 2022 10:14
Deploys a sample API as a service to AKS with 10 replicas and sets AGIC for ingress. Was taken from https://github.com/Azure/application-gateway-kubernetes-ingress/blob/master/docs/examples/aspnetapp.yaml which didn't have replicas set
apiVersion: apps/v1
kind: Deployment
metadata:
name: aspnetapp
labels:
app: aspnetapp
spec:
replicas: 10
selector:
matchLabels:
@Ricky-G
Ricky-G / restore-taskmanager-as-default.ps
Created April 12, 2023 05:02
Restore taskmgr.exe As The Default Task Manager
## You need to run this in your terminal as admin mode
#################################################################
# Restore taskmgr.exe As The Default Task Manager
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe\" -Name 'Debugger'
# Check if PROCEXP64.EXE is still Task Manager
if($null -eq (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe\" | Select-Object -ExpandProperty 'Debugger' -ErrorAction Stop)) {
Write-Host "taskmgr.exe if your official Task Manager"
}
@Ricky-G
Ricky-G / ADOServer_UniqueCommiters.ps1
Last active October 26, 2023 21:46
PowerShell script to Get a list of unique committers from Azure Devops && ADO Server
$tfsUrl = "http://your-tfs-server:8080/tfs" # Replace with your TFS server URL
$collection = "DefaultCollection" # Replace with your TFS collection name
$accessToken = "Basic " + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":your-personal-access-token")) #Replace with your Personal Access Token (NB : the colon is required at the beginning of the token before the pat itself)
$Headers = @{
"Authorization" = $accessToken
"Content-Type" = "application/json"
}
# Get all projects
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.Azure.Storage;
using Microsoft.Azure.Storage.Blob;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
using System.Diagnostics;
using System.IO.Compression;
@Ricky-G
Ricky-G / UnzipGZipTarFile.cs
Last active June 25, 2023 08:49
Extracting GZip Tar Files Natively in .NET without external libraries
using System;
using System.IO;
using System.IO.Compression;
using System.Formats.Tar;
class Program
{
static void Main(string[] args)
{
string sourceTarGzFilePath = @"C:\_Temp\test.tar.gz";