Skip to content

Instantly share code, notes, and snippets.

View pvpshoot's full-sized avatar
🍎

Mike Sinyakov pvpshoot

🍎
  • Rostelecom IT
  • Ulyanovsk
View GitHub Profile
@pvpshoot
pvpshoot / index.js
Last active June 1, 2018 13:32
RFR help
import {
applyMiddleware,
combineReducers,
compose,
createStore as createReduxStore,
} from 'redux';
import { connectRoutes } from 'redux-first-router';
import thunk from 'redux-thunk';
import createHistory from 'history/createBrowserHistory';
const COLORS = {
blue: ['#1E88E5', '#90CAF9'],
brown: ['#6D4C41', '#D7CCC8'],
gray: ['#212121', '#BDBDBD'],
green: ['#388E3C', '#A5D6A7'],
red: ['#E53935', '#EF9A9A'],
orange: ['#F4511E', '#FFAB91'],
purple: ['#8E24AA', '#E1BEE7'],
yellow: ['#FFD600', '#FFF59D'],
}
@pvpshoot
pvpshoot / contacts
Last active October 10, 2019 11:28
github - https://github.com/pvpshoot
vk - http://vkontakte.ru/pvpshoot
tw - https://twitter.com/pvpshoot
telegram - @pvpshoot
import { types } from 'mobx-state-tree';
const StatusModel = types
.model('StatusModel', {
statusValue: types.optional(types.enumeration('status', ['initial', 'loading', 'success', 'failed']), 'initial'),
statusResponseReasonMessage: types.maybe(types.string),
})
.views(self => ({
get isInitial() {
return self.statusValue === 'initial';
file = File.open("input");
lines = file.readlines
arr = []
subA = []
i = 0
for line in lines do
i += 1
n = line.to_i
if n > 0