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
let mapleader = "," | |
if &compatible | |
set nocompatible " Be iMproved | |
endif | |
call plug#begin('~/.vim/plugged') | |
Plug 'tpope/vim-fugitive' | |
Plug 'airblade/vim-gitgutter' |
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
--[[ | |
Awesome WM configuration template | |
github.com/copycat-killer | |
--]] | |
-- {{{ Required libraries | |
local awesome, client, screen, tag = awesome, client, screen, tag |
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH=/usr/share/oh-my-zsh | |
export GOPATH=$HOME/go | |
export PATH=$PATH:$GOPATH/bin | |
# Set name of the theme to load. Optionally, if you set this to "random" |
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 CONSONANT = "бвгджзклмнпрстфхцчшщ" | |
const VOWEL = "еёаиэюяоу" | |
const isFirst = i => i == 0 | |
const isEven = n => (n % 2) == 0 | |
const rand = n => | |
Math.floor(Math.random() * n) | |
const randChar = string => |
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 createStore = (reducer, initialState) => { | |
let state = initialState | |
let listeners = [] | |
const getState = () => state | |
const dispatch = action => { | |
state = reducer(state, action) | |
listeners.forEach(listener => listener()) | |
} |
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 { createStore, combineReducers } = require('redux') | |
const ActionType = { | |
Inc: Symbol(), | |
Dec: Symbol(), | |
Pow: Symbol(), | |
} | |
const inc = () => | |
({ type: ActionType.Inc }) |
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 getLastNumbers = number => number % 100 | |
const getLastNumber = number => number % 10 | |
const inRange = (start, end, number) => number >= start && number <= end | |
const getNumberForm = number => { |
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 filter = (pred, arr) => { | |
const DEFAULTSTATE = [] | |
return arr.reduce( | |
(result, current, i, reducingArray) => | |
pred(current, i, reducingArray) | |
? [...result, current] | |
: result, | |
DEFAULTSTATE | |
) | |
} |
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 map = (fn, arr) => { | |
const DEFAULTSTATE = [] | |
return arr.reduce( | |
(result, current, i, reducingArray) => | |
[...result, fn(current, i, reducingArray)], | |
DEFAULTSTATE | |
) | |
} |
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
//xs.filter((el, i) => i != 0)*/ | |
// { | |
// todos: [ | |
// { | |
// id: 1, | |
// text: "first", | |
// status: "active", | |
// }, | |
// { |
NewerOlder