Posts

Powershell script to enumerate Folders/Items within a TFS Project

Image
 Hi, Recently I had a requirement to enumerate folders/Items within a TFS project. The below is the powershell script I used to achieve it. $url = "http://tfsserver:8080/tfs" $folders = Invoke-RestMethod -Uri "$url/CodePortal/QuickWinProjects/_apis/tfvc/items" -Method Get -UseDefaultCredentials -ContentType application/json $folders.value.ForEach({    Write-Host $_.path })

Module to Gzip Compress dynamic aspx pages in Sharepoint

Image
Hi Guys, Recently we had a requirement to compress (gzip) all the dynamic aspx pages within our Sharepoint portal to be compressed before sent to the browser. So this was the module I created to get the task done. Enable Dynamic Page Compression in IIS then add the module in web.config public class GZipCompressionModule : IHttpModule     {         public GZipCompressionModule()         {         }         void IHttpModule.Dispose()         {         }         void IHttpModule.Init(HttpApplication context)         {             context.BeginRequest += Context_BeginRequest;             context.EndRequest += Context_EndRequest;         }         private void Context_BeginRequest(object sender, EventArgs e)     ...

Working with Hot Reload in VS 2019

Image
  Hi Guys, 1)      Please update VS 2019 to Version 16.11.11 by Clicking Help -> Check For Updates 2)       Run your project Make Code Changes Press on the Fire Icon to apply code changes without Restarting Project

Simple API using Python, Flask and pyodbc

Image
  Hi Guys, I recently learnt the fundamentals of python, one of widely used languages right now. It is super fast in executing and I recommend everyone to give it a try. So I decided to the create a Simple API which will connect to a SQL Server database to perform CRUD operations. Hope you enjoy.  1) Make sure you have installed python     Go to command prompt type " python --version ", it will return the installed version of python in your computer as shown in the image. If it throws an error, don't worry you can go   to https://www.python.org/downloads/ to download the latest version of python to your pc 2) Install pyodbc to connect to SQL Server Database      Go to command prompt type " pip install pyodbc " 3) Install flask to create the api application      Go to command prompt type " pip install flask " 4) Open Visual Studio Code and create a new file "sqlapi.py" and paste the following code import  pyodbc  impor...

Spinwheel using .NET Core and Winsheel.js

Image
 Hi All, Recently I had request from one of my friends to create a small application to distribute 1000 gifts among employees of a certain company. 1) There were 5 types of gifts 2) Each type had 200 gifts 3) Gifts must be given in a random way 4) Every employee must get a gift 5) They should not get a gift which is over So created a small application with a .NET Core backend, html, javascript. I used Winwheel.js to create the spinwheel. Hope you like it. 1) Solution  2) SQL Tables 3) HomeController.cs using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using SpinWheelAppCore.Models; namespace SpinWheelAppCore.Controllers {     public class HomeController : Controller     {         private readonly ILogger<HomeController> _logger;       ...