Skip to content

Instantly share code, notes, and snippets.

View Disane87's full-sized avatar
📱
Working from home

Marco Franke Disane87

📱
Working from home
View GitHub Profile
@Disane87
Disane87 / orderby.extension.ts
Created March 5, 2020 22:13
Array orderBy by properties in array type
type FlattenIfArray<T> = T extends (infer R)[] ? R : T;
interface Array<T> {
orderBy<K extends keyof FlattenIfArray<T>>(key: K): Array<any>;
}
Array.prototype.orderBy = function<K>(key: K): Array<any> {
return this.sort((a: any, b: any) => a[key] - b[key]);
}
@Disane87
Disane87 / app.component.html
Last active March 3, 2020 08:40
medium-disane-angular-router-tabs-routes
<div class="d-flex container-fluid flex-row h-100">
<div class="navigation m-3">
<ul class="nav flex-column nav-pills">
<li class="nav-item" [class.pt-3]="!first" *ngFor="let route of routes; let first = first;">
<a class="nav-link" routerLinkActive="active" [routerLinkActiveOptions]="{exact:true}" [routerLink]="route.path">{{route.component.name }}</a>
</li>
</ul>
</div>
<div class="tab container flex-fill h-100 px-0 bg-white border-bottom d-flex flex-column">
# mssql-agent-fts-ha-tools
# Maintainers: Microsoft Corporation (twright-msft on GitHub)
# GitRepo: https://github.com/Microsoft/mssql-docker
# Base OS layer: Latest Ubuntu LTS
FROM mcr.microsoft.com/mssql-tools
# Install prerequistes since it is needed to get repo config for SQL server
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \