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
// 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
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; |
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 { Observable, ConnectableObservable, GroupedObservable, observable, Subject, BehaviorSubject, ReplaySubject, AsyncSubject, asapScheduler, asyncScheduler, queueScheduler, animationFrameScheduler, VirtualTimeScheduler, VirtualAction, Scheduler, Subscription, Subscriber, pipe, noop, identity, isObservable, ArgumentOutOfRangeError, EmptyError, ObjectUnsubscribedError, UnsubscriptionError, TimeoutError, bindCallback, bindNodeCallback, defer, empty, forkJoin, from, fromEvent, fromEventPattern, generate, iif, interval, never, of, pairs, range, throwError, timer, using, EMPTY, NEVER, config } = require('rxjs'); | |
const { audit, auditTime, buffer, bufferCount, bufferTime, bufferToggle, bufferWhen, catchError, combineAll, combineLatest, concat, concatAll, concatMap, concatMapTo, count, debounce, debounceTime, defaultIfEmpty, delay, delayWhen, dematerialize, distinct, distinctUntilChanged, distinctUntilKeyChanged, elementAt, endWith, every, exhaust, exhaustMap, expand, fil |
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 Git = require('nodegit'); | |
const CLIEngine = require('eslint').CLIEngine; | |
/** | |
* Usage: node lint_modified_lines.js | |
* | |
* This script: | |
* 1. Determines the files and lines that have been added or changed compared to the master branch. | |
* 2. Runs eslint. | |
* 3. Filters the lint results to only the lines that have been added or changed. |
OlderNewer