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 / 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 / disable-sentry.md
Last active February 3, 2025 19:35
Disable Sentry in development environment (or any other env) using Next.js/Node.js

Disable Sentry in development environment (or any other)

Look for Sentry config file/s (sentry.client.js & sentry.config.js)

Either file should contain an object like this

Sentry.init({
  dsn: DSN_YOU_ACQUIRED_FROM_SENTRY
})
@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 / 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 / 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.

Upload the image with a preview using HTML, CSS & JavaScript

image

Photo by Helena Lopes from Pexels

Code below:

@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

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