Skip to content

Instantly share code, notes, and snippets.

View MirzaLeka's full-sized avatar
:octocat:

Mirza Leka MirzaLeka

:octocat:
View GitHub Profile
@MirzaLeka
MirzaLeka / 0-init.md
Created October 11, 2024 13:52
Angular Reactive Form with Async Validations

Angular Reactive Forms with Validations & Async Validations

@MirzaLeka
MirzaLeka / dayjs-sort.md
Created September 29, 2024 10:46
Dayjs sort by Date

DayJS Sort By Date

var dayjs = require("dayjs")

let n = [ '2018-10-05T10:30:00',
  '2018-10-05T08:05:00',
  '2018-10-05T08:20:00',
  '2018-10-05T08:30:00',
 '2018-10-05T10:10:00',
@MirzaLeka
MirzaLeka / migrate-to-angular-18.md
Created September 14, 2024 18:41
Angular 18 Upgrade Guide

Angular 18 Upgrade Guide

Version before the update:

  • Angular: 17.3
  • Node.js: 18.8

Install Node.js LTS

  • Download Node.js 20.17.0
  • Install on the machine
@MirzaLeka
MirzaLeka / read-object-metadata-in-csharp.md
Last active July 23, 2024 16:27
Object.keys & Object.values in C#

C# - Read Object MetaData using Reflections

C# is statically typed language which requires explicit handling for runtime inspection.

Reflection is what allows C# developers to inspect data structures by looking up:

  • The type of an object
  • Properties
  • Methods, etc.
@MirzaLeka
MirzaLeka / 1-json-to-csharp.md
Last active July 28, 2024 08:03
Read JSON file into a C# Classes

Read JSON file into a C# Classes

Create the class skeleton

using Newtonsoft.Json; // Requires installation

public class LINQTutorial
{
    private List<Student> _students;
@MirzaLeka
MirzaLeka / 1-info.md
Last active March 31, 2024 02:05
Reactive Validation Triggers in Angular Forms

Reactive Validation Triggers in Angular Forms

Learn how to enhance Angular form validations using Reactive Forms and a few gimmicks.

Demos

Input + Time based validation trigger

C# Web API Read Request Headers from Middleware and Controller

Headers Model

Adding [FromHeader(Name = "<header-name>") attribute is crutial for reading the headers on the controller level.

	public class TodoHeaders
	{
		[FromHeader(Name = "header1")]

Documenting JS/TS Code using JSDoc & Typedoc

Initialize the Node.js project using NPM:

> npm init -y

Update the package.json to use ES Modules

Angular Frontend & SSR Deployment on IIS

Videos

Angular Front

Deploy angular app to IIS - YouTube (Kudvenkat) https://www.youtube.com/watch?v=VkGmaVm6-IQ

Angular 15 deployment in IIS Server | Hosting angular in IIS Server | Nihira Techiees - YouTube