Skip to content

Instantly share code, notes, and snippets.

View andreystarkov's full-sized avatar
:electron:
<3

Andrei Starcow andreystarkov

:electron:
<3
View GitHub Profile
const arr = [
{
name: 'Визуализация пользовательской отчетности ОКО'
tags: ['one', 'two', 'three', 'four', 'five', 'six', 'seven'],
percentage: {
from: 80,
to: 73
}
},
{
http://t.me/overabstracted
@touchableopacity
VISA: 4274 3200 4701 3654
BTC: 3CjcZTA95PD5WpBjJS6w7jMh6zr36qPLja
ETH: 0xBfC68B9D311ED219F207a0070d1719eF59eD40d9
Paypal: paypal.me/starcow
// Открываешь чаты в badoo.com, слева должен быть список с именами
// Справа должен быть чат
// Прокручиваешь до самого низу диалоги (что бы были прогружены все)
// В таком состоянии открываешь инспектор (правой кнопкой по пустому месту)
// Открываешь вкладку Console и туда вставляешь весь код ниже
// Жмешь Enter
const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms))
function getMessage () {
@andreystarkov
andreystarkov / callApiSagaExaple.js
Last active October 30, 2019 16:24
API Call Saga Example Usage
import { call, put, select } from 'redux-saga/effects'
import camel from 'to-camel-case'
export function * callAPI (api, action) {
let method = action.type.split('_')
method.pop()
method = camel(method.join('_'))
const apiCall = api[method]
const payload = { ...action }
@andreystarkov
andreystarkov / stores.md
Last active October 17, 2019 19:08
stores

Short story about stores

This is how redux store folder struture should look like:

Core principles:

  • One file - one entity
  • Upcoming imports
did:muport:QmV5PXgTWxVYQZcFcMkM4BEYBHWM8ssiDfMKk3hgT2zRkq
did:muport:QmV5PXgTWxVYQZcFcMkM4BEYBHWM8ssiDfMKk3hgT2zRkq
@andreystarkov
andreystarkov / ApolloClient.js
Created June 4, 2019 17:22
cache options for apollo client
import { ApolloClient } from 'apollo-client'
import { ApolloLink, concat } from 'apollo-link'
import { HttpLink } from 'apollo-link-http'
import { InMemoryCache } from 'apollo-cache-inmemory'
const defaultOptions = {
watchQuery: {
fetchPolicy: 'network-only',
errorPolicy: 'ignore'
},
import { createReducer, createActions } from 'reduxsauce'
import Immutable from 'seamless-immutable'
import { sizes } from 'Themes/Media'
const { Types, Creators } = createActions({
layoutSetWidth: ['width']
})
export const LayoutTypes = Types