Skip to content

Instantly share code, notes, and snippets.

View tshego3's full-sized avatar

Tshegofatso Motswagae tshego3

  • South Africa
  • 21:14 (UTC +02:00)
View GitHub Profile
@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 August 18, 2025 12:42
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):

@tshego3
tshego3 / Private Cloud Gaming on macOS 15.md
Last active July 13, 2025 13:45
Private Cloud Gaming on macOS 15 (Sequoia): RDP & Sunshine/Moonlight Streaming from Windows 11 Pro

Private Cloud Gaming on macOS 15

Remote Desktop & Sunshine/Moonlight Streaming from Windows 11 Pro

Remote Desktop from Mac to Windows 11 Pro on macOS 15

This guide walks you through every step—Windows setup, macOS configuration, firewall tweaks (including edge traversal), and error troubleshooting—to establish a stable Remote Desktop connection using Microsoft Remote Desktop on macOS 15 (“Sequoia”), even when the Windows Pro host is unlicensed.


@tshego3
tshego3 / C# Cheatsheet.md
Last active July 20, 2025 22:20
C# Cheatsheet

C# Cheatsheet

Common Source Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
@tshego3
tshego3 / .NET Distance Calculator.md
Last active July 7, 2025 10:47
Haversine formula-based Coordinate Distance Calculator
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;

public class Program
{
    public class Coordinate
    {
@tshego3
tshego3 / D365 F&O Development Processes.md
Last active August 26, 2025 15:40
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