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
Dim TMPX As Long | |
Dim TMPX2 As Long | |
Const nrg1 As Integer = 100 | |
Dim ampl As Currency | |
Dim phase As Currency | |
Dim currPh As Currency | |
Dim li As Currency | |
Dim spd As Currency | |
Dim R As Integer | |
Dim MeMovX, MeMovY |
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
class BinanceExchange { | |
@memoize({ maxAge: 2000 }) | |
@throttle({ weight: 120 }) | |
@binanceFailSafe() | |
private static async fetchTickerMemoized() { | |
log('Fetching 24hr ticker'); | |
const ticker = await BinanceMarket.performPublicRequest<any>('GET', 'v1/ticker/24hr', {}); | |
return ticker.reduce((acc, market) => ({ ...acc, [decodeSymbol(market.symbol)]: market }), {}); | |
} | |
} |
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
export type IComponentEnhancer<I, O> = ( | |
Component: React.ComponentType<I>, | |
) => React.ComponentType<O>; | |
export function compose<A>(): IComponentEnhancer<A, A>; | |
export function compose<A, B>(hoc1: IComponentEnhancer<A, B>): IComponentEnhancer<A, B>; | |
export function compose<A, B, C>( | |
hoc1: IComponentEnhancer<B, C>, | |
hoc2: IComponentEnhancer<A, B>, | |
): IComponentEnhancer<A, C>; |
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 strategy = { | |
id: '00000000-0000-0000-0000-000000000001', | |
type: 'CHAIN', | |
payload: { | |
actions: [ | |
{ | |
id: '00000000-0000-0000-0000-000000000002', | |
type: 'TRAILING_SELL', | |
payload: { | |
exchange: 'binance', |
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
export type IHideToastOnTimeoutEpic = IEpic< | |
IToastShowAction | IToastDismissAction, | |
IToastDismissAction | |
>; | |
const hideToastOnTimeoutEpic: IHideToastOnTimeoutEpic = (action$, state$) => { | |
const showAction$ = action$.ofType<IToastShowAction>(TOAST_SHOW); | |
const dismissAction$ = action$.ofType<IToastDismissAction>(TOAST_DISMISS); |
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
git reset --soft HEAD~3 && | |
git commit |
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 knex from 'knex'; | |
import * as Docker from 'dockerode'; | |
import { sleep } from '../util/time'; | |
import { waitForDatabase } from '../test/waitForDatabase'; | |
const docker = new Docker({ socketPath: '/var/run/docker.sock' }); | |
let dbContainer: Docker.Container; | |
let knexClient: knex; |
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 Application from 'koa'; | |
import * as KoaRouter from 'koa-router'; | |
import { IRegistrableController } from './RegistrableController'; | |
import { injectable } from 'inversify'; | |
@injectable() | |
export abstract class AbstractRouterController implements IRegistrableController { | |
public abstract prefix: string; | |
public abstract setup(router: KoaRouter); |
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
image: node | |
pipelines: | |
branches: | |
staging: | |
- step: | |
script: | |
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD | |
- make TAG=staging docker-build docker-push | |
- step: |
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
IMAGE_NAME := superorder/superorder-datafeed | |
CONTAINER_NAME := superorder-datafeed | |
SERVICE_NAME := superorder_datafeed | |
TAG := latest | |
docker-build: | |
docker build -t $(IMAGE_NAME):$(TAG) . | |
docker-start: | |
docker run -it --name $(CONTAINER_NAME) --rm $(IMAGE_NAME):$(TAG) |