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
// "postbuild": "node environments/postbuild.js", | |
// from https://dev.to/dylanvdmerwe/reduce-angular-style-size-using-purgecss-to-remove-unused-styles-3b2k | |
const exec = require('child_process').exec; | |
const fs = require('fs'); | |
const path = require('path'); | |
// find the styles css file | |
const files = getFilesFromPath('./dist', '.css'); | |
let data = []; |
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
// https://www.sassmeister.com/ - playground | |
@for $tr from 1 through 30 { | |
@for $td from 1 to 30 { | |
.tr-#{$tr}-td-#{$td}-p0 tr:nth-child(#{$tr}) td:nth-child(#{$td}) { | |
padding: 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
#Gut feeling | |
Если вы ещё не нашли своего дела, ищите. | |
Как это бывает со всеми сердечными делами, вы узнаете, когда найдёте. Не останавливайтесь. | |
Steve Jobs | |
#Articles hosting | |
### medium.com | |
Publications: Angular in Depth, ITNext, CloudBoost, etc | |
### dev.to |
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
//html | |
<input formControlName="account_value" | |
appCommified | |
matInput type="text"> | |
//typescript | |
import {Directive, ElementRef, HostListener, Input} from '@angular/core'; | |
import {MAT_INPUT_VALUE_ACCESSOR} from '@angular/material'; | |
import {numberWithCommas} from '@app/global_helpers'; |
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
let Rx = window.Rx = window['rxjs']; | |
let {forkJoin, Subject, merge, of} = Rx; | |
let {ajax} = Rx.ajax; | |
let {map, filter, tap, takeLast, scan, startWith} = Rx.operators; | |
console.clear(); | |
function forkJoinTransparent(arrayOfObservables) { | |
const emptyArray = Array.from(Array(arrayOfObservables.length)); |
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 './polyfills'; | |
// jasmine staff | |
declare var jasmine; | |
import jasmineRequire from 'jasmine-core/lib/jasmine-core/jasmine.js'; | |
window['jasmineRequire'] = jasmineRequire; | |
import 'jasmine-core/lib/jasmine-core/jasmine-html.js'; | |
import 'jasmine-core/lib/jasmine-core/boot.js'; | |
// zone.js testing imports |
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
//js | |
let Rx = window['rxjs']; | |
const {defer} = Rx; | |
const {take, repeat} = Rx.operators; | |
const {ajax} = Rx.ajax; | |
console.clear(); | |
let counter=0; | |
const getData = () => defer(() => ajax('http://localhost:4001/list-data?page='+counter++)) | |
.pipe(retry(2), repeat(2)) |
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 selector = (x) => x.userId | |
const throttleTimeout = 3000; | |
source$ | |
.pipe( | |
groupBy(selector), | |
mergeMap((group$) => group$.pipe(throttleTime(throttleTimeout))) | |
) | |
.subscribe(showNotification); |
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
let Rx = window['rxjs']; | |
let {from, of, asyncScheduler} = Rx; | |
let {mergeMap, filter, delay, groupBy, throttleTime} = Rx.operators; | |
console.clear(); | |
let throttleSelectiveFilter = (throttleTimeout = 0, selector = (x) => x) => { | |
return (source) => { | |
return source.pipe( | |
groupBy(selector), | |
mergeMap((group$) => group$.pipe(throttleTime(throttleTimeout))) |
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
let Rx = window['rxjs']; | |
let {from, of, asyncScheduler} = Rx; | |
let {mergeMap, filter, delay} = Rx.operators; | |
console.clear(); | |
let throttleSelectiveFilter = (throttleTime = 0, selector = (x) => x) => { | |
let setOfEntities = new Set(); | |
return (source) => { | |
return source.pipe( | |
filter((notif) => { |
NewerOlder