Skip to content

Instantly share code, notes, and snippets.

View sergeymakoveev's full-sized avatar
💭

Sergey Makoveev sergeymakoveev

💭
View GitHub Profile
@sergeymakoveev
sergeymakoveev / channels.ts
Created December 13, 2020 21:50 — forked from raveclassic/channels.ts
Generic websocket client
import { ResponseValidationError, WebSocketClient, WebSocketClient1, WebSocketClient2 } from '../client/client';
import {
LightMeasuredPublishMessage,
LightMeasuredPublishMessageIO,
} from '../components/messages/LightMeasuredPublishMessage';
import { Id, IdIO } from '../components/schemas/Id';
import { Lumens, LumensIO } from '../components/schemas/Lumens';
import { SentAt, SentAtIO } from '../components/schemas/SentAt';
import { mapLeft, fold } from 'fp-ts/lib/Either';
import { HKT, Kind, Kind2, URIS, URIS2 } from 'fp-ts/lib/HKT';
import { fold, pending, RemoteData } from '@devexperts/remote-data-ts';
import { constNull } from 'fp-ts/lib/function';
import { createElement, memo, useEffect, useMemo, useState } from 'react';
import { pipe } from 'fp-ts/lib/pipeable';
import { LiveData } from '@devexperts/rx-utils/dist/live-data.utils';
import { newSink, Sink } from '@devexperts/rx-utils/dist/sink2.utils';
import { Context, context } from '@devexperts/rx-utils/dist/context2.utils';
import { observable } from '@devexperts/rx-utils/dist/observable.utils';
import { distinctUntilChanged, share, switchMap } from 'rxjs/operators';
import { render } from 'react-dom';
@sergeymakoveev
sergeymakoveev / webpack-recipies.md
Last active October 29, 2019 18:17
webpack: use express-middleware for proxy request and modify response, set fake-endpoints and generate its response

Рецепты использования Webpack

@sergeymakoveev
sergeymakoveev / bindinghandler.js
Last active December 20, 2016 13:00 — forked from jarroda/bindinghandler.js
knockout-binding for bootstrap-tagsinput
ko.bindingHandlers.tagsinput = {
init: function(element, valueAccessor, allBindings) {
var options = allBindings().tagsinputOptions || {};
var value = valueAccessor();
var valueUnwrapped = ko.unwrap(value);
var el = $(element);
el.tagsinput(options);
/* =============================================================
* bootstrap-scrollspy.js v2.0.1
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*