I hereby claim:
- I am nitive on github.
- I am maxim_samoilov (https://keybase.io/maxim_samoilov) on keybase.
- I have a public key ASBC725xKuReURyZObjW6ieAuCx7ojFJSPC0iSFPp47AHAo
To claim this, I am signing this object:
function addHandler(fn, arg, resolve, reject) { | |
try { | |
const result = fn(arg); | |
if (result instanceof MyPromise) { | |
result.then(resolve).catch(reject); | |
} else { | |
process.nextTick(() => resolve(result)); | |
} | |
} catch (err) { | |
process.nextTick(() => reject(err)); |
I hereby claim:
To claim this, I am signing this object:
module Main | |
console.log : Show a => a -> IO () | |
console.log = printLn | |
createComponent : Show a => String -> a -> String | |
createComponent tag content = "<" ++ tag ++ ">" ++ show content ++ "</" ++ tag ++ ">" | |
syntax [arr] ".map" [f] = map f arr | |
syntax [arr] ".forEach" [f] = traverse f arr |
const fs = require('fs') | |
const posthtml = require('posthtml') | |
function merge(...objs) { | |
return Object.assign({}, ...objs) | |
} | |
function removeAttr(attr, tree) { | |
tree.match({ attrs: { [attr]: true } }, node => { | |
return merge(node, { attrs: merge(node.attrs, { [attr]: undefined }) }) |
import * as React from 'react' | |
// TLDR: This component load icons async on client but sync on server | |
export default class Icon extends React.PureComponent { | |
constructor(props) { | |
super(props) | |
// We should add DefinePlugin to webpack which replace | |
// process.env.IS_SERVER_SIDE with true or false. | |
// Then UglifyJS will remove require() in client code so icons won't be loaded. |
import * as pick from 'lodash/pick'; | |
import * as React from 'react'; | |
import { MobileWebsiteApi } from '../api/api'; | |
import { FixedComponentsStore } from '../components/fixed/store'; | |
import { CookiesUtils } from '../utils/cookies'; | |
// экспортируем типы контекста, чтобы было удобней импортировать | |
// import { connect, MobileWebsiteApi } from '../../utils/context_provider'; | |
export { MobileWebsiteApi, FixedComponentsStore, CookiesUtils }; |
// <script async src="https://...?lang=ru_RU&load=&onload=_onYandexMapLoaded"></script> | |
// or use module aload instead of async attribute (github.com/pazguille/aload) | |
(function () { | |
var ymapFunctionsStack = []; | |
var ymapsLoaded = false; | |
// random postfix to get uniq function name | |
window._onYandexMapLoaded = function () { | |
ymapsLoaded = true; |
На русском:
Полезный софт:
Библиотеки: