Skip to content

Instantly share code, notes, and snippets.

👾
(>◕ᴗ◕)> ~ Function Is Not a Function

Ilya Komar0ff

👾
(>◕ᴗ◕)> ~ Function Is Not a Function
  • Saint Petersburg, Russia
Block or report user

Report or block Komar0ff

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .vimrc
""""""""""""""""""""""""""""""
" == General ==
""""""""""""""""""""""""""""""
" Enable filetype plugins
filetype plugin on
filetype indent on
" Set to auto read when a file is changed from the outside
set autoread
au FocusGained,BufEnter * checktime
@Komar0ff
Komar0ff / gist:544f0899b82a4b7c00494ecaacdb5c03
Last active Jan 14, 2020
Keep your master branch pointing at the original repository and make pull requests from branches on your fork.
View gist:544f0899b82a4b7c00494ecaacdb5c03
git remote add upstream https://github.com/repo.git
git fetch upstream
git branch --set-upstream-to=upstream/master master
git pull
View regexp.js
let regexp = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
@Komar0ff
Komar0ff / GodNooCode_5.js
Last active May 3, 2019
The very bad realizations I've seen at work
View GodNooCode_5.js
beers.sort((first, second) => {
if (queryParams.sorting === 'дороже') {
const firstBeerLittreMaxPrice = Math.max.apply(Math, first.products.map((p) => {
return Math.round(10.0 * p.price / p.boxingVolume) / 10.0;
}));
const secondBeerLittreMaxPrice = Math.max.apply(Math, second.products.map((p) => {
return Math.round(10.0 * p.price / p.boxingVolume) / 10.0;
}));
if (firstBeerLittreMaxPrice < secondBeerLittreMaxPrice) return 1;
if (firstBeerLittreMaxPrice > secondBeerLittreMaxPrice) return -1;
@Komar0ff
Komar0ff / GodNooCode_4.js
Last active May 3, 2019
The very bad realizations I've seen at work
View GodNooCode_4.js
getBasketItemsMap(){
return new Promise((resolve, reject) => {
let value = window.localStorage.getItem('basket');
if (value == undefined || value == '' || value == '[object Object]'){
value = {};
}else {
value = JSON.parse(value);
}
if (value == undefined){
value = {};
@Komar0ff
Komar0ff / GodNooCode_3.js
Last active May 3, 2019
The very bad realizations I've seen at work
View GodNooCode_3.js
export function deleteBasketItemsByIds(productIds){
return (dispatch, getState) => {
dispatch(deleteBasketItemsByIds_());
return BasketAPI.deleteBasketItemsByProductsIds(productIds).then(
() => dispatch(deleteBasketItemsByIdsSuccess(productIds)),
err => dispatch(deleteBasketItemsByIdsFail(err))
)
}
}
@Komar0ff
Komar0ff / GodNooCode_2.js
Last active May 3, 2019
The very bad realizations I've seen at work
View GodNooCode_2.js
import React, {PropTypes} from 'react';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import styled from 'styled-components';
import validator from 'validator'
import Modal from '@atlaskit/modal-dialog'
import { Document, Page } from 'react-pdf';
@Komar0ff
Komar0ff / GodNooCode.js
Last active May 3, 2019
The very bad realizations I've seen at work
View GodNooCode.js
/**
*/
import React, {PropTypes} from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Router, Route, browserHistory, useRouterHistory, hashHistory, IndexRoute } from 'react-router';
import { createHashHistory } from 'history'
You can’t perform that action at this time.