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 type Constructor<T> = new (...args: any[]) => T; | |
/** | |
* Расширение компонентов для стадартизации/централизации отпуска от потока. | |
* Expansion of the components to centralize the dispensing from the flow. | |
* @see [unsubscribe in Angular components](https://medium.com/@gesteira2046/goodbye-to-unsubscribe-in-angular-components-8817e1b21db2) | |
* | |
* @Example | |
* ```ts | |
* export class AppComponent extends ComponentDestroyedMixin() { |
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
/** | |
* @see https://css-tricks.com/custom-scrollbars-in-webkit/ | |
*/ | |
@mixin scrollbars($size, $foreground-color, $background-color: mix($foreground-color, white, 50%)) { | |
// For Google Chrome | |
&::-webkit-scrollbar { | |
width: $size; | |
height: $size; | |
} |
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
* { | |
box-sizing: border-box; | |
} | |
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video { | |
margin: 0; | |
padding: 0; | |
border: 0; | |
outline: 0; | |
font-size: 100%; |
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
// Angular | |
import { Pipe, PipeTransform, OnDestroy, ChangeDetectorRef, NgZone } from '@angular/core'; | |
/** | |
* https://github.com/AndrewPoyntz/time-ago-pipe | |
* An Angular pipe for converting a date string into a time ago | |
* | |
* Example : | |
* <span>Last {{ date | kTimeElapsed}} ago</span> | |
*/ |
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'; | |
/** | |
* Returns filtered array | |
*/ | |
@Pipe({ name: 'filter' }) | |
export class FilterPipe implements PipeTransform { | |
/** | |
* @param array incoming array not sort | |
* @param field name Fields to sort |
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 {AfterViewInit, Directive, HostListener, Input, ElementRef} from '@angular/core'; | |
@Directive({ | |
selector: '[Autosize]' | |
}) | |
export class AutosizeDirective implements AfterViewInit { | |
private el: HTMLElement; | |
private _minHeight: string; | |
private _maxHeight: string; |
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 { Directive, AfterViewInit, ElementRef } from '@angular/core'; | |
@Directive({ | |
selector: '[appAutofocus]' | |
}) | |
export class AutofocusDirective implements AfterViewInit { | |
constructor(private el: ElementRef) {} | |
ngAfterViewInit() { |
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) БЫСТРО ИЩЕМ ПОСЛЕДНИЙ КОММИТ С ВЕРНЫМИ КРЕДАМИ И КОПИРУЕМ ЕГО АЙДИ | |
2) ПИШЕМ | |
git reset --hard 6534hds8sda | |
где *6534hds8sda* и есть тот айдишник | |
3) ИСПРАВЛЯЕМ КОНФИГ: | |
git config --local user.name "ПРАВИЛЬНОЕ ИМЯ" | |
git config --local user.email "ПРАВИЛЬНОЕ МЫЛО" | |
4) ПРОВЕРЯЕМ ЧТО НАПИСАЛИ: | |
git config --local user.name | |
git config --local user.email |
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'; | |
/** | |
* Фильтер Расчет прошедшего времени от времени публикации, | |
* @Example <div>{{news.time | past_time}} ago</div> | |
* @param {number} create_post время создания поста | |
* @returns {string} Сколько времени прошло с момента создания поста | |
*/ | |
@Pipe({ | |
name: 'past_time' |
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: "limitSymbols" | |
}) | |
export class limitSymbols implements PipeTransform { | |
/** | |
* ограничение выводимых символов с добавлением троеточия |
NewerOlder