Skip to content

Instantly share code, notes, and snippets.

@Bazooka2091
Bazooka2091 / LigaturesVSCode
Last active December 12, 2021 16:34
Ligatures
as admin:
- choco install firacode
settings.json
"editor.fontFamily": "Fira Code, Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": true,
restart IDE
@import url(https://fonts.googleapis.com/css?family=Roboto:100);
body { margin-top: 100px; background-color: #137b85; color: #fff; text-align:center; }
h1 {
font: 2em 'Roboto', sans-serif;
margin-bottom: 40px;
}
#loading {
import { Component, OnInit } from '@angular/core';
import { Navigation, Router } from '@angular/router';
import { AuthService } from '../../services/auth/auth.service';
@Component({
selector: 'app-sign-in',
templateUrl: './sign-in.component.html',
styleUrls: ['./sign-in.component.scss'],
})
export class SignInComponent implements OnInit {
@Bazooka2091
Bazooka2091 / distinct-array.ts
Last active September 2, 2021 10:22
TypeScript
const distinct = subjects.filter(
(thing, i, arr) => arr.findIndex(t => t.INN === thing.INN) === i
);
// IE version
const distinctThings = thingsWithDuplicates.filter((thing, i, arr) => {
return arr.indexOf(arr.find(t => t.id === thing.id)) === i;
});