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
FROM node:10 | |
ENV NODE_ENV=development | |
WORKDIR /app | |
COPY package.json package-lock.json ./ | |
RUN npm install | |
COPY . ./ | |
RUN npm run build | |
FROM node:10 | |
ENV NODE_ENV=production |
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
function fn(name){ | |
return f; | |
function f(){ | |
var n = name; | |
console.log("Next TICK "+n+", "); | |
} | |
} | |
function myTimeout(time,msg){ |
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
<div *ngIf="(user$ | async) as user; else loading"> | |
<user-profile | |
[user]="user"> | |
</user-profile> | |
<user-messages | |
[user]="user"> | |
</user-messages> | |
</div> | |
<ng-template #loading> |
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 { Subject } from 'rxjs/Subject'; | |
export default function InvokeListener<T>(): MethodDecorator { | |
return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) { | |
const original = descriptor.value; | |
const emitter$ = new Subject<T>(); | |
const ngOnDestroy = target.ngOnDestroy; | |
target.ngOnDestroy = function () { | |
emitter$.complete(); |
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 * as PromiseThrottle from 'promise-throttle'; | |
function makeThrottle(requestsPerSecond: number) { | |
const promiseThrottle = new PromiseThrottle({ requestsPerSecond }); | |
return (weight: number = 1) => (target: any, key: string, descriptor: PropertyDescriptor) => { | |
if (descriptor === undefined) { | |
descriptor = Object.getOwnPropertyDescriptor(target, key); | |
} |
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
Attribute VB_Name = "ModStdIO" | |
Option Explicit | |
Private Declare Function GetStdHandle Lib "kernel32" (ByVal nStdHandle As Long) As Long | |
Private Declare Function ReadFile Lib "kernel32" (ByVal hFile As Long, _ | |
lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, _ | |
lpNumberOfBytesRead As Long, lpOverlapped As Any) As Long | |
Private Declare Function WriteFile Lib "kernel32" (ByVal hFile As Long, _ | |
lpBuffer As Any, ByVal nNumberOfBytesToWrite As Long, _ | |
lpNumberOfBytesWritten As Long, lpOverlapped As Any) As Long |
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
defun unique (item i list) | |
eq? | |
.indexOf list item | |
i | |
def deps-json " | |
{ | |
\"mongo\": [], | |
\"tzinfo\": [\"thread_safe\"], | |
\"uglifier\": [\"execjs\"], |
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 { fromJS } from 'immutable'; | |
import * as _ from 'lodash'; | |
import { | |
ACTION_CHAIN_UPDATE, | |
ACTION_NODE_ADD, | |
ACTION_NODE_REMOVE, | |
ACTION_NODE_REMOVE_MULTIPLE, | |
ACTION_NODE_UPDATE, | |
ACTION_RUN_ADD, ACTION_RUN_DELETE, ACTION_RUN_UPDATE, | |
ACTION_UPDATE_ACTIVE_CHAIN, |
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 * as React from 'react'; | |
interface BlurTextInputStateInterface { | |
value: string, | |
lastChangeEvent: React.ChangeEvent<HTMLInputElement>, | |
} | |
export default class extends React.Component<React.InputHTMLAttributes<HTMLInputElement>, BlurTextInputStateInterface> { | |
constructor(props: any) { | |
super(props); |