Skip to content

Instantly share code, notes, and snippets.

View tshego3's full-sized avatar

Tshegofatso Motswagae tshego3

  • South Africa
  • 06:47 (UTC +02:00)
View GitHub Profile
@tshego3
tshego3 / Azure AD B2C Integration for ASP.NET Web App.md
Created October 2, 2025 10:21
A simple setup to integrate Azure AD B2C into your ASP.NET web app from scratch. This will get you up and running with user login and secure API access.

Azure AD B2C Integration for ASP.NET Web App

A simple setup to integrate Azure AD B2C into your ASP.NET web app from scratch. This will get you up and running with user login and secure API access.

  • Create an Azure AD B2C Tenant

    • Go to Azure Portal
    • Search for Azure AD B2C → Click Create a new B2C tenant
    • Follow the wizard to set it up, then link it to your subscription
@tshego3
tshego3 / Essential Algorithms For Developers with C#.md
Created September 30, 2025 11:07
Essential Algorithms For Developers with C#

Essential Algorithms For Developers with C#

A curated collection of fundamental algorithms every developer should master. Each entry includes a concise definition, a C# implementation, and sample output to illustrate how it works in practice.


Searching Algorithms

@tshego3
tshego3 / D365 F&O Development Processes.md
Last active November 5, 2025 15:08
D365 F&O Development Processes

D365 F&O Development Processes

Tips & Tricks

VM shutdown

  • To minimize the chance of your database going into an inconsistent state, please ensure you shut down your VM from within the VM first before shutting down your computer. This only applies to scenarios where the VM is hosted on your computer.

Useful Links

@tshego3
tshego3 / Sending SMTP Email Using MailKit in C#.md
Last active August 24, 2025 15:10
MailKit is a cross-platform mail client library built on top of MimeKit.
@tshego3
tshego3 / Microsoft B2C OAuth 2.0 using Postman.md
Last active October 2, 2025 10:22
Here’s a comprehensive guide to obtain a token from Microsoft B2C OAuth 2.0 using Postman with the Implicit Grant Flow. You’ve already shared a lot of the required information, so we’ll build on that.

Microsoft B2C OAuth 2.0 using Postman

1. Prerequisites

Make sure you have the following:

  • A registered application in Azure AD B2C.
  • A Policy defined (like a sign-up/sign-in policy).
  • A Client ID (Application ID) from your B2C app.
  • A Scope related to your Web API.
@tshego3
tshego3 / Building a Native JavaScript Server-Side Proxy API for RSS Feeds.md
Last active August 13, 2025 22:07
In this tutorial, we'll create a server-side proxy API that fetches data from an RSS feed URL, parses the feed, and returns the result in JSON format. This is especially useful for avoiding CORS issues when consuming RSS data from external sources on the client-side.

Building a Native JavaScript Server-Side Proxy API for RSS Feeds

#rss-proxy-api

Prerequisites

  • Basic knowledge of JavaScript and Node.js.
  • Node.js installed (Download from Node.js official website).
  • A code editor, such as VSCode.
  • npm or yarn for managing packages.
@tshego3
tshego3 / Native JS Reusable Components Cheat Sheet.md
Last active August 13, 2025 19:44
A cheat sheet for developing reusable components using native JavaScript (no frameworks like React or Vue) within an API-driven context, styled with Bootstrap 5.3.

Native JS Reusable Components Cheat Sheet (API + Bootstrap 5.3)

Folder Structure (Suggested)

/components
  └── CardComponent.js
  └── ModalComponent.js
/api
  └── fetchData.js
@tshego3
tshego3 / Complete Postman Guide Spotify API.md
Last active August 18, 2025 12:46
Here’s a comprehensive step-by-step guide on how to use Postman (Web version) to authenticate with the Spotify Web API and retrieve a user's playlists, including how to get the required access token via OAuth 2.0.

Complete Postman Guide: How to Use the Spotify API to Get a User's Playlists (With OAuth 2.0 Authentication)


Goal

Use Postman to authenticate a Spotify user and get their playlists using the Spotify Web API.


@tshego3
tshego3 / Building Dynamic Modals - Using Kendo UI Window.md
Last active July 28, 2025 10:42
Building Dynamic Modals: Using Kendo UI Window with LoadContentFrom and Kendo UI Form in ASP.NET MVC

How to call or render an Html.Kendo().Window() from JavaScript in ASP.NET MVC.

Get started with ASP.NET Core MVC Telerik UI for ASP.NET MVC Examples & Demos

The Html.Kendo().Window() helper generates the necessary HTML and JavaScript to create the Kendo UI Window widget on the client-side. Once rendered, you can interact with it using its client-side API.

Here's how you can achieve this, including integrating a Kendo UI Form within it:

1. Define Your Kendo UI Window in your Razor View (initially hidden):