Skip to content

Instantly share code, notes, and snippets.

View wegorich's full-sized avatar
💩
Crappy codding

Egor Malkevich wegorich

💩
Crappy codding
View GitHub Profile
@wegorich
wegorich / base-vm.js
Created September 12, 2016 16:01
Using the Aurelia with Redux
export class BaseVM {
_syncInit() {
this._sync();
this._unsubscribe = this.store.subscribe(this._sync.bind(this));
}
_syncUnsubscribe() {
this._unsubscribe();
}
@wegorich
wegorich / index.ts
Last active March 5, 2020 15:01
how work with localmock client
import { from, ApolloClient, HttpLink, InMemoryCache } from '@apollo/client';
import { errorLink } from './error.link';
import * as tags from './posts.resolvers';
const typeDefs = [tags.typeDefs];
const resolvers = [tags.resolvers];
const gqlClient = new ApolloClient({
cache: new InMemoryCache(),
typeDefs,

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@wegorich
wegorich / cloudSettings
Last active February 4, 2019 11:27
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-02-04T11:27:46.791Z","extensionVersion":"v3.2.4"}
let actionsArray = [];
let types = {};
export function getTypes() {
return types;
}
export function setActionTypes(actions, mutateWith = ['Request', 'Error']) {
if (!actionsArray.length) {
actionsArray = Object.keys(actions);
@wegorich
wegorich / sheet.js
Created July 6, 2018 17:41
how to crawl google docs using node.js
/**
* Simple Node.js script to turn a specific page on a Google Sheet
* into a JSON object for the main purpose of HTML Templating.
*
* @author jonobr1 / http://jonobr1.com
*
*/
/* eslint func-names: ["error", "never"] */
const https = require('https');
const { StringDecoder } = require('string_decoder');
@wegorich
wegorich / sheet.js
Created July 6, 2018 17:41
how to crawl google docs using node.js
/**
* Simple Node.js script to turn a specific page on a Google Sheet
* into a JSON object for the main purpose of HTML Templating.
*
* @author jonobr1 / http://jonobr1.com
*
*/
/* eslint func-names: ["error", "never"] */
const https = require('https');
const { StringDecoder } = require('string_decoder');
@wegorich
wegorich / lalla
Created June 22, 2018 10:15
bank
DEUTSCHE BANK TRUST COMPANY AMERICAS, NEW YORK
BKTRUS33
04-095-326
@wegorich
wegorich / use-store-decorator.ts
Created January 23, 2018 22:27
use-store-decorator.ts make it TS friendly
import { bindActionCreators } from 'redux';
// @ts-ignore
import { simpleActions } from 'redux-pirate-actions';
export abstract class UseStore {
actions: any;
store: any;
private errorTimeout: any;
@wegorich
wegorich / use-store-decorator.js
Created January 11, 2018 13:15
test js decorator to work as class extension aka class mixins
import { bindActionCreators } from 'redux';
import { simpleActions } from 'redux-pirate-actions';
function syncInit() {
this.syncUnsubscribe();
this._sync();
this._unsubscribe = this.store.subscribe(this._sync.bind(this));
}
function syncUnsubscribe() {