This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// reflection in typescript | |
const fida = { | |
fName: 'Fida', | |
lName: 'Haq', | |
age: 28 | |
} | |
class ReflectionClass { | |
[property: string]: string | number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requires WSL2 on windows | |
# Required windows config | |
# --------------------------------- | |
## in powershell run | |
# wsl --set-default-version 2 | |
## to set wsl 2 as default | |
# --------------------------------- | |
## Then run | |
# wsl -l -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'templateLogger', | |
}) | |
export class TemplateLoggerPipe implements PipeTransform { | |
transform(value: any) { | |
console.log('TEMPLATE LOGGER: ', value) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class Guid { | |
public static validator = new RegExp("^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$", "i"); | |
public static EMPTY = "00000000-0000-0000-0000-000000000000"; | |
public static isGuid(guid: any) { | |
const value: string = guid.toString(); | |
return guid && (guid instanceof Guid || Guid.validator.test(value)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.mat-elevation-z0 { | |
box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12) | |
} | |
.mat-elevation-z1 { | |
box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const https = require('https') | |
async function fetch(url) { | |
return new Promise((resolve, reject) => { | |
const request = https.get(url, { timeout: 1000 }, (res) => { | |
if (res.statusCode < 200 || res.statusCode > 299) { | |
return reject(new Error(`HTTP status code ${res.statusCode}`)) | |
} | |
const body = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"hours": [ | |
{ | |
"airTemperature": { | |
"noaa": 26.61 | |
}, | |
"time": "2023-06-06T00: 00: 00+00: 00" | |
}, | |
{ | |
"airTemperature": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 1. INTRODUCTION | |
/* | |
This script drops all fk constraints and tables from a configured scema. | |
*/ | |
/*---------------------------*/ | |
/* 2. CONFIGURATION */ | |
/*---------------------------*/ | |
declare @schema varchar(52) = 'dbo'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"Updated": "1980-01-30T21:03:04.209Z", | |
"FirstName": "Declan", | |
"LastName": "Hoppe", | |
"Email": "Price@mafalda.biz", | |
"Phone": "454.136.0468", | |
"CreatedDate": "2001-03-29T05:50:54.244Z", | |
"Id": 0 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Injectable} from '@angular/core'; | |
import {NavigationEnd, Router, RouterEvent} from "@angular/router"; | |
import {filter} from "rxjs/operators"; | |
import {Subscription} from "rxjs"; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class TrackUrlHistoryService { | |
/* PROPERTIES */ |
NewerOlder