This file contains hidden or 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
#!/usr/bin/env bash | |
docker run -it --name container1 -v /home/tweatherly/dir:/home/node/app node:8 bash | |
# /home/tweatherly/dir is the local machine directory to share | |
# /home/node/app is the the mapped directory within the node container | |
# | |
# you can specify a custom shell instead of node:8, e.g. | |
# pmoreau/node8-npm5-ngcli:8.9.3-5.5.1-6.0.3 |
This file contains hidden or 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
#!/usr/bin/env bash | |
docker run -it --name container1 -v /home/tweatherly/dir:/home/node/app node:8 bash | |
# /home/tweatherly/dir is the local machine directory to share | |
# /home/node/app is the the mapped directory within the node container | |
# | |
# you can specify a custom shell instead of node:8, e.g. | |
# pmoreau/node8-npm5-ngcli:8.9.3-5.5.1-6.0.3 |
This file contains hidden or 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
#!/usr/bin/env bash | |
docker run -it --name container1 -v /home/tweatherly/dir:/home/node/app node:8 bash | |
# /home/tweatherly/dir is the local machine directory to share | |
# /home/node/app is the the mapped directory within the node container | |
# | |
# you can specify a custom shell instead of node:8, e.g. | |
# pmoreau/node8-npm5-ngcli:8.9.3-5.5.1-6.0.3 |
This file contains hidden or 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
#!/usr/bin/env bash | |
docker run -it --name container1 -v /home/tweatherly/dir:/home/node/app node:8 bash | |
# /home/tweatherly/dir is the local machine directory to share | |
# /home/node/app is the the mapped directory within the node container | |
# | |
# you can specify a custom shell instead of node:8, e.g. | |
# pmoreau/node8-npm5-ngcli:8.9.3-5.5.1-6.0.3 |
This file contains hidden or 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
/** | |
* This node js script scans through the input component template files and tidy's them according to certain guidelines. | |
* | |
* Sample shell command: | |
* node tidy-templates.js src/app projects | |
* | |
* To disable lint for a template add this comment to the top of the file: | |
* <!-- tidy-templates: disable --> | |
* | |
* Derived from: |
This file contains hidden or 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
// Example usage: | |
// node replace_file_snippet.js \ | |
// inputFile.html '<!--InsertionAreaStart-->' '<!--InsertionAreaEnd-->' \ | |
// snippetFile.html '<!--OptionalSnippetStart-->' '<!--OptionalSnippetEnd-->' \ | |
// outputFile.html | |
const fs = require('fs'); | |
const path = require('path'); | |
function main() { |
This file contains hidden or 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
/* tslint:disable:no-forward-ref */ | |
import { OnInit, Directive, HostListener, ElementRef, forwardRef } from '@angular/core'; | |
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; | |
import { I18NCurrencyPipe } from '../pipes'; | |
export const CURRENCY_INPUT_DIRECTIVE_VALUE_ACCESSOR: any = { | |
provide: NG_VALUE_ACCESSOR, | |
useExisting: forwardRef(() => CurrencyInputDirective), | |
multi: true |
This file contains hidden or 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 { CurrencyPipe } from '@angular/common'; | |
import { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({name: 'appCurrency'}) | |
export class I18NCurrencyPipe extends CurrencyPipe implements PipeTransform { | |
constructor() { | |
// NOTE: This seemingly doesn't change anything, but is required. | |
super('en'); | |
} |
This file contains hidden or 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 { Observable, BehaviorSubject, Subject } from 'rxjs'; | |
export enum StoreState { | |
INIT, | |
LOADING, | |
READY | |
} | |
interface StoreInterface<T> { | |
value$: Observable<T>; |
This file contains hidden or 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 { rxObserver } = require('api/v0.3'); | |
const { of, timer } = require('rxjs'); | |
const { delay, expand, takeWhile, map } = require('rxjs/operators'); | |
const sessionDuration = 9; | |
const warningAmount = 7; | |
const expireEpoch = Date.now() + sessionDuration | |
const warningEpoch = expireEpoch - warningAmount; |
OlderNewer